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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createMakefiles.R \name{createMakeBlockRules} \alias{createMakeBlockRules} \title{Create the make rules for a block of the viz.yaml} \usage{ createMakeBlockRules(block = c("fetch", "process", "visualize", "publish")) } \arguments{ \item{block...
/man/createMakeBlockRules.Rd
permissive
AHeadman-USGS/vizlab
R
false
true
486
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createMakefiles.R \name{createMakeBlockRules} \alias{createMakeBlockRules} \title{Create the make rules for a block of the viz.yaml} \usage{ createMakeBlockRules(block = c("fetch", "process", "visualize", "publish")) } \arguments{ \item{block...
\name{getTweets} \alias{getTweets} \title{Connect to Mongo database and extract tweets that match conditions specified in the arguments.} \usage{ getTweets(ns, string = NULL, df = TRUE, fields = c("created_at", "user.screen_name", "text"), retweets = NULL, hashtags = NULL, verbose = TRUE) } \arguments{ \ite...
/streamR-mongo/man/getTweets.Rd
no_license
vanessahlira/streamR
R
false
false
4,093
rd
\name{getTweets} \alias{getTweets} \title{Connect to Mongo database and extract tweets that match conditions specified in the arguments.} \usage{ getTweets(ns, string = NULL, df = TRUE, fields = c("created_at", "user.screen_name", "text"), retweets = NULL, hashtags = NULL, verbose = TRUE) } \arguments{ \ite...
########## Plot 4 ############## h_pow_cons <- read.table("G:/Exploratory Analysis/Week One/exdata_data_household_power_consumption/household_power_consumption.txt", sep = ";", header = TRUE, na.string = "?") h_pow_cons$Date <- as.Date(h_pow_cons$Date, "%d/%m/%Y") # plot subset feb.1n2 <- h_pow_cons[h_pow_cons$Date ...
/plot4.R
no_license
vikramranga/ExData_Plotting1
R
false
false
1,646
r
########## Plot 4 ############## h_pow_cons <- read.table("G:/Exploratory Analysis/Week One/exdata_data_household_power_consumption/household_power_consumption.txt", sep = ";", header = TRUE, na.string = "?") h_pow_cons$Date <- as.Date(h_pow_cons$Date, "%d/%m/%Y") # plot subset feb.1n2 <- h_pow_cons[h_pow_cons$Date ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotMissing_bar.R \name{plotMissing_bar} \alias{plotMissing_bar} \title{show % samples with missing data, with one bar per variable} \usage{ plotMissing_bar(x, ttl, showPct = TRUE, tpose = FALSE) } \arguments{ \item{x}{(data.frame) rows are v...
/man/plotMissing_bar.Rd
no_license
shraddhapai/dataExplore
R
false
true
737
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotMissing_bar.R \name{plotMissing_bar} \alias{plotMissing_bar} \title{show % samples with missing data, with one bar per variable} \usage{ plotMissing_bar(x, ttl, showPct = TRUE, tpose = FALSE) } \arguments{ \item{x}{(data.frame) rows are v...
# Set year dummy variables for 2000-20007 dd$y01 <- 0 dd$y02 <- 0 dd$y03 <- 0 dd$y04 <- 0 dd$y05 <- 0 dd$y06 <- 0 dd$y07 <- 0 dd$y01[dd$year == 2001] <- 1 dd$y02[dd$year == 2002] <- 1 dd$y03[dd$year == 2003] <- 1 dd$y04[dd$year == 2004] <- 1 dd$y05[dd$year == 2005] <- 1 dd$y06[dd$year == 2006] <- 1 dd$y07[dd$year == 20...
/amjobsg.R
no_license
econdataus/amjobs
R
false
false
8,217
r
# Set year dummy variables for 2000-20007 dd$y01 <- 0 dd$y02 <- 0 dd$y03 <- 0 dd$y04 <- 0 dd$y05 <- 0 dd$y06 <- 0 dd$y07 <- 0 dd$y01[dd$year == 2001] <- 1 dd$y02[dd$year == 2002] <- 1 dd$y03[dd$year == 2003] <- 1 dd$y04[dd$year == 2004] <- 1 dd$y05[dd$year == 2005] <- 1 dd$y06[dd$year == 2006] <- 1 dd$y07[dd$year == 20...
library(tidyverse) map(mtcars, ~length(unique(.x))) map_int(sw_people, ~length(.x$films)) %>% table() sw_people[map_int(sw_people, ~length(.x$films)) == 7] %>% map_chr("name") sw_people <- sw_people %>% set_names(map_chr(sw_people, "name")) as.numeric(map(mtcars, mean)) devtools::install_github("jennybc/repurrrsive"...
/WEEK 4/week4.R
no_license
Yanping123DFEF/data-wrangling
R
false
false
3,286
r
library(tidyverse) map(mtcars, ~length(unique(.x))) map_int(sw_people, ~length(.x$films)) %>% table() sw_people[map_int(sw_people, ~length(.x$films)) == 7] %>% map_chr("name") sw_people <- sw_people %>% set_names(map_chr(sw_people, "name")) as.numeric(map(mtcars, mean)) devtools::install_github("jennybc/repurrrsive"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bigtcr_func.R \name{get.gap.pval} \alias{get.gap.pval} \title{Comparison of Bivariate CCIF} \usage{ get.gap.pval(obs.y, event, v, tau = Inf, comp.event = c(1, 2), np = 1000, Kt = function(x) { 1 }) } \arguments{ \item{obs.y}{\eqn{Y}: ti...
/man/get.gap.pval.Rd
no_license
cran/bigtcr
R
false
true
1,184
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bigtcr_func.R \name{get.gap.pval} \alias{get.gap.pval} \title{Comparison of Bivariate CCIF} \usage{ get.gap.pval(obs.y, event, v, tau = Inf, comp.event = c(1, 2), np = 1000, Kt = function(x) { 1 }) } \arguments{ \item{obs.y}{\eqn{Y}: ti...
#install.packages("data.table") #install.packages("plyr") library(data.table) library(microbenchmark) library(plyr) #clear memory rm(list=ls()) #set path to get files pathData = "C:/Users/mockwlk/Desktop/R Programming/Assg1/specdata" #print(path) #define function to get average polluteCount <- function(pathInput,id)...
/Solution1b.R
no_license
mockwlk/ProgrammingAssignment1
R
false
false
1,240
r
#install.packages("data.table") #install.packages("plyr") library(data.table) library(microbenchmark) library(plyr) #clear memory rm(list=ls()) #set path to get files pathData = "C:/Users/mockwlk/Desktop/R Programming/Assg1/specdata" #print(path) #define function to get average polluteCount <- function(pathInput,id)...
# The variable `n` specifies the number of independent bets on green n <- 10000 # The variable `B` specifies the number of times we want the simulation to run B <- 10000 # Use the `set.seed` function to make sure your answer matches the expected result after random number generation set.seed(1) # Generate a vector `...
/32_central_limite_theorem2.R
no_license
jorickdefraine/harvardxph125_training
R
false
false
576
r
# The variable `n` specifies the number of independent bets on green n <- 10000 # The variable `B` specifies the number of times we want the simulation to run B <- 10000 # Use the `set.seed` function to make sure your answer matches the expected result after random number generation set.seed(1) # Generate a vector `...
#Merge two data sets by common column names. E.g., rotated test booklets #Create two dummy data sets, x and y x <- cbind(c(6,6,6,6),c(7,7,7,7),c(8,8,8,8),c(9,9,9,9),c(10,10,10,10)) colnames(x) <- c("x1","x2","x3","aa","x5") y <- cbind(c(1,2,3,4,5),c(3,4,2,1,4),c(6,7,8,5,9)) colnames(y) <- c("y1","aa","y3") x <- data...
/DataManipulation/MergeTwoDataSetsByColumnName.R
no_license
toby270205/BitsAndPieces
R
false
false
509
r
#Merge two data sets by common column names. E.g., rotated test booklets #Create two dummy data sets, x and y x <- cbind(c(6,6,6,6),c(7,7,7,7),c(8,8,8,8),c(9,9,9,9),c(10,10,10,10)) colnames(x) <- c("x1","x2","x3","aa","x5") y <- cbind(c(1,2,3,4,5),c(3,4,2,1,4),c(6,7,8,5,9)) colnames(y) <- c("y1","aa","y3") x <- data...
setwd("D:/Kaggle/titanic") titanic.train = read.csv(file="train.csv", stringsAsFactors = FALSE, header= TRUE) titanic.test = read.csv(file="test.csv", stringsAsFactors = FALSE, header= TRUE) titanic.train$IsTrainSet = TRUE titanic.test$IsTrainSet = FALSE titanic.test$Survived = NA titanic.full = rbind(titanic.t...
/model.R
no_license
subhambare/Titanic
R
false
false
1,648
r
setwd("D:/Kaggle/titanic") titanic.train = read.csv(file="train.csv", stringsAsFactors = FALSE, header= TRUE) titanic.test = read.csv(file="test.csv", stringsAsFactors = FALSE, header= TRUE) titanic.train$IsTrainSet = TRUE titanic.test$IsTrainSet = FALSE titanic.test$Survived = NA titanic.full = rbind(titanic.t...
library(fitbitScraper) ### Name: get_intraday_data ### Title: Get intraday data from fitbit.com ### Aliases: get_intraday_data ### Keywords: data ### ** Examples ## Not run: ##D get_intraday_data(cookie, what="steps", date="2015-01-20") ## End(Not run) get_intraday_data
/data/genthat_extracted_code/fitbitScraper/examples/get_intraday_data.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
279
r
library(fitbitScraper) ### Name: get_intraday_data ### Title: Get intraday data from fitbit.com ### Aliases: get_intraday_data ### Keywords: data ### ** Examples ## Not run: ##D get_intraday_data(cookie, what="steps", date="2015-01-20") ## End(Not run) get_intraday_data
REGION_MAPPINGS <- fread("mappings/region_map.csv") NATION_MAPPINGS <- fread("mappings/nation_map.csv") filter_municipalities <- function(municipalities){ filtered_municipalities <- sapply(municipalities, function(mun){ mun = trimws(mun) gsub(pattern = "other municipal...
/R/utilities.R
no_license
sardegnaturismo/VodShiny
R
false
false
1,017
r
REGION_MAPPINGS <- fread("mappings/region_map.csv") NATION_MAPPINGS <- fread("mappings/nation_map.csv") filter_municipalities <- function(municipalities){ filtered_municipalities <- sapply(municipalities, function(mun){ mun = trimws(mun) gsub(pattern = "other municipal...
# Power Spectral analysis of Fusaroli 2015 data # Yang Xu # 12/19/2016 library(data.table) library(MASS) library(pracma) # read length data dt = readRDS('dt.merged.rds') # read performance data dt.pf = fread('data/PerformanceData.tsv') setkey(dt.pf, Pair) ### # spectral analysis setkey(dt, cid, who) dt.spec = dt[...
/danish/fusaroli2015_exp/pso.r
no_license
innerfirexy/dialog-spec
R
false
false
2,090
r
# Power Spectral analysis of Fusaroli 2015 data # Yang Xu # 12/19/2016 library(data.table) library(MASS) library(pracma) # read length data dt = readRDS('dt.merged.rds') # read performance data dt.pf = fread('data/PerformanceData.tsv') setkey(dt.pf, Pair) ### # spectral analysis setkey(dt, cid, who) dt.spec = dt[...
## Read data colNames <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3") data <- read.table("household_po...
/plot3.R
no_license
EKalashnikov/ExData_Plotting1
R
false
false
1,221
r
## Read data colNames <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3") data <- read.table("household_po...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nazwa_pliku.R \name{nazwa_pliku} \alias{nazwa_pliku} \title{generuje nazwę pliku zgodną z konwencją} \usage{ nazwa_pliku(zbior, rozszerzenie = ".RData", katalog = "cache", rocznik = "") } \arguments{ \item{zbior}{nazwa zbioru} \item{rozsze...
/man/nazwa_pliku.Rd
no_license
zozlak/MLAKdane
R
false
true
533
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nazwa_pliku.R \name{nazwa_pliku} \alias{nazwa_pliku} \title{generuje nazwę pliku zgodną z konwencją} \usage{ nazwa_pliku(zbior, rozszerzenie = ".RData", katalog = "cache", rocznik = "") } \arguments{ \item{zbior}{nazwa zbioru} \item{rozsze...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/CertificateManager.R \name{CertificateManager} \alias{CertificateManager} \title{Create a CertificateManager object} \usage{ CertificateManager(...) } \value{ the CertificateManager object } \description{ Construct an instance of Cert...
/dataone/man/CertificateManager.Rd
permissive
KillEdision/rdataone
R
false
false
899
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/CertificateManager.R \name{CertificateManager} \alias{CertificateManager} \title{Create a CertificateManager object} \usage{ CertificateManager(...) } \value{ the CertificateManager object } \description{ Construct an instance of Cert...
outer <- function(){ x <- 10 y <- 12 add <- function(){ result <- x + y print(paste("Sum is",result)) } sub <- function(){ result <- x - y print(paste("Sub is",result)) } add() sub() } outer()
/3.Functions/07-NestedFunctions.R
no_license
KartikayThakkar/R-programming-Language
R
false
false
254
r
outer <- function(){ x <- 10 y <- 12 add <- function(){ result <- x + y print(paste("Sum is",result)) } sub <- function(){ result <- x - y print(paste("Sub is",result)) } add() sub() } outer()
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.parameters.R \name{summary.parameters} \alias{summary.parameters} \title{Summary parameters} \usage{ \method{summary}{parameters}(object, ci.level = 0.9, ...) } \arguments{ \item{object}{object of parameters.} \item{ci.level}{numeric...
/TLMoments/man/summary.parameters.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
1,245
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.parameters.R \name{summary.parameters} \alias{summary.parameters} \title{Summary parameters} \usage{ \method{summary}{parameters}(object, ci.level = 0.9, ...) } \arguments{ \item{object}{object of parameters.} \item{ci.level}{numeric...
# analysis of input data: # show daily precipitation per ez # script update 18/09/2011 library (tseries) setwd('C:/AHT.PRO/Pakistan_Modelling/Data/Precipitation/NOAA/Mangla/') # setwd('C:/AHT.PRO/Pakistan_Modelling/Data/Precipitation/Aphrodite/Mangla/') input <- "rainfall_0.txt" # Mangla cc <- c("character","intege...
/prec_analysis_step2.R
no_license
climatepals/R-Scripts
R
false
false
1,436
r
# analysis of input data: # show daily precipitation per ez # script update 18/09/2011 library (tseries) setwd('C:/AHT.PRO/Pakistan_Modelling/Data/Precipitation/NOAA/Mangla/') # setwd('C:/AHT.PRO/Pakistan_Modelling/Data/Precipitation/Aphrodite/Mangla/') input <- "rainfall_0.txt" # Mangla cc <- c("character","intege...
source("R/utilities/utilities.R") source("R/utilities/nested_models.r") source("R/utilities/variables.r") df_2min_roll <- readRDS(DF_JOINED) output_folder <- "output/calibration/scenarios/2weeks_2months_2weeks/" if (!dir.exists(output_folder)) { dir.create(output_folder, recursive = T) } sensor_field = "media...
/R/calibration_scenarios_Xweeks_Xmonths/calibration_2weeks_2months_2weeks_2.R
permissive
FEEprojects/Paper_calibration_nocs_data_analysis
R
false
false
3,366
r
source("R/utilities/utilities.R") source("R/utilities/nested_models.r") source("R/utilities/variables.r") df_2min_roll <- readRDS(DF_JOINED) output_folder <- "output/calibration/scenarios/2weeks_2months_2weeks/" if (!dir.exists(output_folder)) { dir.create(output_folder, recursive = T) } sensor_field = "media...
# Class Defintion --------------------------------------------------------- # This class is used to represent a "task" in our R program. #' @importFrom R6 R6Class Task <- R6::R6Class("Task", public = list( id = NULL, name = NULL, dura...
/R/utility_functions.R
no_license
Genuar/projmanr
R
false
false
7,975
r
# Class Defintion --------------------------------------------------------- # This class is used to represent a "task" in our R program. #' @importFrom R6 R6Class Task <- R6::R6Class("Task", public = list( id = NULL, name = NULL, dura...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/view_folder.R \name{view_folder} \alias{view_folder} \title{Open a folder or a file's folder} \arguments{ \item{path}{a file path} } \description{ Opens the specified folder, or the containing folder of the specified file, in the file...
/man/view_folder.Rd
permissive
lindsayplatt/powstreams
R
false
false
333
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/view_folder.R \name{view_folder} \alias{view_folder} \title{Open a folder or a file's folder} \arguments{ \item{path}{a file path} } \description{ Opens the specified folder, or the containing folder of the specified file, in the file...
### Create map ggplot theme_opts ---------------------------------------------------- theme_fig <- function(base_size = 9){ theme_bw(base_size=base_size) + theme(plot.title = element_text(face='bold',size=14,hjust=0), plot.background = element_rect(fill='white'), # PANEL ...
/Scripts/Etienne/map_theme.r
permissive
nathgoh/SESUR
R
false
false
1,029
r
### Create map ggplot theme_opts ---------------------------------------------------- theme_fig <- function(base_size = 9){ theme_bw(base_size=base_size) + theme(plot.title = element_text(face='bold',size=14,hjust=0), plot.background = element_rect(fill='white'), # PANEL ...
#RECOVER THE TREE DISTRIBUTION FOR EACH MEASMT OBS BASED ON THE WEIBULL PARAMETERS RECOVERED FROM # THE PREDICTED MOMENTS #Load the data load("Model 3 Predicted Weibull Parameter Data.Rdata") #Loading in plyr() from library library(plyr) #Loading in needed functions source(file="WeibullParametersEstimation...
/Weibull Diameter Distribution Recovery_Model 3.R
no_license
Fedzzy/Diameter-Class-Growth-and-Yield---Thesis
R
false
false
18,405
r
#RECOVER THE TREE DISTRIBUTION FOR EACH MEASMT OBS BASED ON THE WEIBULL PARAMETERS RECOVERED FROM # THE PREDICTED MOMENTS #Load the data load("Model 3 Predicted Weibull Parameter Data.Rdata") #Loading in plyr() from library library(plyr) #Loading in needed functions source(file="WeibullParametersEstimation...
#' @export .onAttach <- function(libname, pkgname) { packageStartupMessage("Run options(error = DYM()) to enable 'Did you mean' feature", domain="R-DYM") }
/DYM/R/hooks.R
no_license
ingted/R-Examples
R
false
false
159
r
#' @export .onAttach <- function(libname, pkgname) { packageStartupMessage("Run options(error = DYM()) to enable 'Did you mean' feature", domain="R-DYM") }
#' @export setup_point_data <- function(point_data, full_data=FALSE){ #-------------------------------------- #= 1. Retrieve coordinates #-------------------------------------- id_x_lon <- grep(pattern = "[Ll][Oo][Nn]",x = names(point_data))[1] id_y_lat <- grep(pattern = "[Ll][Aa][Tt]",x = names(point_data)...
/R/utils.R
no_license
IanOndo/TDWG
R
false
false
2,886
r
#' @export setup_point_data <- function(point_data, full_data=FALSE){ #-------------------------------------- #= 1. Retrieve coordinates #-------------------------------------- id_x_lon <- grep(pattern = "[Ll][Oo][Nn]",x = names(point_data))[1] id_y_lat <- grep(pattern = "[Ll][Aa][Tt]",x = names(point_data)...
library("data.table") #Reads in data from file then subsets data for specified dates powerDT <- data.table::fread(input = "household_power_consumption.txt" , na.strings="?" ) # Prevents Scientific Notation powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Glob...
/plot4.R
no_license
usamab20/ExData_Plotting1
R
false
false
1,524
r
library("data.table") #Reads in data from file then subsets data for specified dates powerDT <- data.table::fread(input = "household_power_consumption.txt" , na.strings="?" ) # Prevents Scientific Notation powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Glob...
constraints <- function(dose=dose, lastdose=lastdose, actualdltcohort=actualdltcohort, numberdltrule=NA, lowerlimitrule=NA, upperlimitrule=NA, dltrule=NA, increaserule=NA, minimum=NA, maximum=NA) { #WARNINGS# if ((is.na(numberdltrule)==FALSE) & (is.na(dltrule)==TRUE)) { ...
/R/constraints.R
no_license
cran/ordcrm
R
false
false
10,256
r
constraints <- function(dose=dose, lastdose=lastdose, actualdltcohort=actualdltcohort, numberdltrule=NA, lowerlimitrule=NA, upperlimitrule=NA, dltrule=NA, increaserule=NA, minimum=NA, maximum=NA) { #WARNINGS# if ((is.na(numberdltrule)==FALSE) & (is.na(dltrule)==TRUE)) { ...
#libraries needed library(reshape2) library(plyr) library(tidyr) filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, filename) } if (!...
/GitFolder/SamsungData/run_analysis.R
no_license
fkbarker/SamsungDataAssignment
R
false
false
2,034
r
#libraries needed library(reshape2) library(plyr) library(tidyr) filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, filename) } if (!...
#Processing of rawdata downloaded from https://odaforalle.au.dk/ #Rawdata is open and free to access #For both lakes and streams data contains pH and alkalinity #Water temperature are in contained in "field" for streams or "profile" for lakes depending on how the samples were collected #For streams discharge data i...
/rawdata_processing.R
no_license
KennethTM/dk_freshwaters_budget
R
false
false
6,266
r
#Processing of rawdata downloaded from https://odaforalle.au.dk/ #Rawdata is open and free to access #For both lakes and streams data contains pH and alkalinity #Water temperature are in contained in "field" for streams or "profile" for lakes depending on how the samples were collected #For streams discharge data i...
library(highcharter) shinyUI(tabsetPanel( tabPanel( "Treemap of PARV4 and other BBV prevalence in a multicentre African cohort", fluidPage( uiOutput("treemap_cohort_selection_UI"), uiOutput("treemap_categories_UI"), uiOutput("treemap_summary_UI"), highchartOutput("treemap_hc", height ...
/ui.R
no_license
charliejhadley/parv4_prevalence_treemap
R
false
false
476
r
library(highcharter) shinyUI(tabsetPanel( tabPanel( "Treemap of PARV4 and other BBV prevalence in a multicentre African cohort", fluidPage( uiOutput("treemap_cohort_selection_UI"), uiOutput("treemap_categories_UI"), uiOutput("treemap_summary_UI"), highchartOutput("treemap_hc", height ...
testlist <- list(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0)) result <- do.call(diffrproje...
/diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962523-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
365
r
testlist <- list(x = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0)) result <- do.call(diffrproje...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615765728-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,803
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
##### install packages rm(list = ls()) library(lme4) library(reshape) library(foreign) library(ggplot2) library(plyr) library(data.table) library(reshape2) library(Hmisc) library(mgcv) library(gdata) library(car) library(dplyr) library(ggmap) library(broom) library(splines) library(DataCombine) library(splines) libra...
/Residuals_correction_code/archive/gam_resid_smooth_bimon_2.R
no_license
alexandrashtein/Model-code
R
false
false
15,921
r
##### install packages rm(list = ls()) library(lme4) library(reshape) library(foreign) library(ggplot2) library(plyr) library(data.table) library(reshape2) library(Hmisc) library(mgcv) library(gdata) library(car) library(dplyr) library(ggmap) library(broom) library(splines) library(DataCombine) library(splines) libra...
# 5. 다중회귀모형에서 변수의 선택 ------------------------------------------------------------------------------ # AIC 값으로 최고의 모델 선택 AIC(fit, fit2) # 변수선택법 - 단계 선택법 # 1. Backward : 모든 변수부터 영향이 적은 변수를 하나씩 제거해 AIC 값이 가장 낮은 모델 선택 # 2. Forward : 상수항부터 시작해 변수를 하나씩 추가해 AIC값이 가장 낮은 모델 선택 # step() 함수는 AIC 값을 이용하여 단계적 회귀를 수행하는 함수로 fo...
/ch09/ch09_4_다중회귀모형.R
no_license
noc1992/R_Statistics
R
false
false
2,196
r
# 5. 다중회귀모형에서 변수의 선택 ------------------------------------------------------------------------------ # AIC 값으로 최고의 모델 선택 AIC(fit, fit2) # 변수선택법 - 단계 선택법 # 1. Backward : 모든 변수부터 영향이 적은 변수를 하나씩 제거해 AIC 값이 가장 낮은 모델 선택 # 2. Forward : 상수항부터 시작해 변수를 하나씩 추가해 AIC값이 가장 낮은 모델 선택 # step() 함수는 AIC 값을 이용하여 단계적 회귀를 수행하는 함수로 fo...
\name{olesen2002aigrettes} \alias{olesen2002aigrettes} \docType{data} \title{ A flower visitation network from the Azores} \description{ The structure of pollination networks were investigated for two oceanic islands, the Azorean Flores and the Mauritian Ile aux Aigrettes. } \usage{data(olesen2002aigrettes)} \details{...
/bipartite/man/olesen2002aigrettes.Rd
no_license
afbarth/how-to-bipartite
R
false
false
999
rd
\name{olesen2002aigrettes} \alias{olesen2002aigrettes} \docType{data} \title{ A flower visitation network from the Azores} \description{ The structure of pollination networks were investigated for two oceanic islands, the Azorean Flores and the Mauritian Ile aux Aigrettes. } \usage{data(olesen2002aigrettes)} \details{...
test_that(desc = "Test the dates", { expect_equal(base::class(covid19swiss$date) == "Date", TRUE) expect_equal(base::min(covid19swiss$date) == as.Date("2020-01-24"), TRUE) }) test_that(desc = "Test the structure", { expect_equal(base::ncol(covid19swiss) == 7, TRUE) expect_equal(base::nrow(covid19swiss) >= 6...
/tests/testthat/test_data.R
permissive
JoyCatherineBarena/covid19swiss
R
false
false
336
r
test_that(desc = "Test the dates", { expect_equal(base::class(covid19swiss$date) == "Date", TRUE) expect_equal(base::min(covid19swiss$date) == as.Date("2020-01-24"), TRUE) }) test_that(desc = "Test the structure", { expect_equal(base::ncol(covid19swiss) == 7, TRUE) expect_equal(base::nrow(covid19swiss) >= 6...
# Simulates data, fit network inference, get scores rm(list=ls()); par(mfrow=c(1, 1), mex=.5, pch=20) seed <- 2; set.seed(seed) library(gtools); library(mvtnorm); library(sna); library(rggm) library(blockmodels) library(MASS); library(mclust); library(PLNmodels) library(huge); library(saturnin); library(GeneNet); libr...
/Pgm/SimulScoreSR-replicates.R
no_license
scj-robin/NoisyNetworkInference
R
false
false
3,587
r
# Simulates data, fit network inference, get scores rm(list=ls()); par(mfrow=c(1, 1), mex=.5, pch=20) seed <- 2; set.seed(seed) library(gtools); library(mvtnorm); library(sna); library(rggm) library(blockmodels) library(MASS); library(mclust); library(PLNmodels) library(huge); library(saturnin); library(GeneNet); libr...
context( "Compare results with Marcotte, Denis. 1996. 'Fast Variogram Computation with FFT.' Computers & Geosciences 22 (10): 1175–86. doi:10.1016/S0098-3004(96)00026-X." ) ## set up input matrices from paper m1 = raster(matrix(c(3, 6, 5, 7, 2, 2, 4, NA, 0), ncol = 3, byrow = T)) m2 = raster(matrix(c(10, NA, 5, NA,...
/tests/testthat/tests.R
permissive
AdamWilsonLab/rasterAutocorr
R
false
false
1,307
r
context( "Compare results with Marcotte, Denis. 1996. 'Fast Variogram Computation with FFT.' Computers & Geosciences 22 (10): 1175–86. doi:10.1016/S0098-3004(96)00026-X." ) ## set up input matrices from paper m1 = raster(matrix(c(3, 6, 5, 7, 2, 2, 4, NA, 0), ncol = 3, byrow = T)) m2 = raster(matrix(c(10, NA, 5, NA,...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{mongo.bson.buffer.append.regex} \alias{mongo.bson.buffer.append.regex} \title{Append a timestamp value into a mongo.bson.buffer} \usage{ mongo.bson.buffer.append.regex(buf, name, value) } \arguments{ \item{buf}{(\link{mongo.bson.buffer}) The buffer object to wh...
/man/mongo.bson.buffer.append.regex.Rd
no_license
agnaldodasilva/rmongodb
R
false
false
1,067
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{mongo.bson.buffer.append.regex} \alias{mongo.bson.buffer.append.regex} \title{Append a timestamp value into a mongo.bson.buffer} \usage{ mongo.bson.buffer.append.regex(buf, name, value) } \arguments{ \item{buf}{(\link{mongo.bson.buffer}) The buffer object to wh...
##Download the file and put the file in the data folder if(!file.exists("./data")){dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="./data/getdata-projectfiles-UCI HAR Dataset.zip") ##Unzip the file unzip(zipfile="...
/run_analysis.R
no_license
ambrish/Getting-and-Cleaning-Data
R
false
false
3,223
r
##Download the file and put the file in the data folder if(!file.exists("./data")){dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="./data/getdata-projectfiles-UCI HAR Dataset.zip") ##Unzip the file unzip(zipfile="...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/run.R \name{submit_child_run} \alias{submit_child_run} \title{Submit an experiment and return the active child run} \usage{ submit_child_run(parent_run, config = NULL, tags = NULL) } \arguments{ \item{parent_run}{The parent \code{Run} object....
/man/submit_child_run.Rd
permissive
Azure/azureml-sdk-for-r
R
false
true
546
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/run.R \name{submit_child_run} \alias{submit_child_run} \title{Submit an experiment and return the active child run} \usage{ submit_child_run(parent_run, config = NULL, tags = NULL) } \arguments{ \item{parent_run}{The parent \code{Run} object....
#--- Length of unique values function --# #'@title Calculates the number of unique values in a vector #'@description Calculates the number of unique values in a vector. #'@author Charles Crabtree \email{ccrabtr@umich.edu} #'@param x A vector. #'@return The number of unique values in a vector. #'@examples #'x <- rep(c(1...
/A_github/sources/authors/6477/plotrr/lengthunique.r
no_license
Irbis3/crantasticScrapper
R
false
false
435
r
#--- Length of unique values function --# #'@title Calculates the number of unique values in a vector #'@description Calculates the number of unique values in a vector. #'@author Charles Crabtree \email{ccrabtr@umich.edu} #'@param x A vector. #'@return The number of unique values in a vector. #'@examples #'x <- rep(c(1...
##Set J to be null makeCacheMatrix <- function(x = matrix()) { j <- NULL set <- function(y){ x <<- y j <<- NULL } get <- function()x setInverse <- function(inverse) j <<- inverse getInverse <- function() j list(set = set, get = get, setInverse = setInverse, getInverse = getInvers...
/cachematrix.R
no_license
meltkt1999/ProgrammingAssignment2
R
false
false
566
r
##Set J to be null makeCacheMatrix <- function(x = matrix()) { j <- NULL set <- function(y){ x <<- y j <<- NULL } get <- function()x setInverse <- function(inverse) j <<- inverse getInverse <- function() j list(set = set, get = get, setInverse = setInverse, getInverse = getInvers...
\name{scale_manual} \alias{scale_manual} \alias{scale_colour_manual} \alias{scale_fill_manual} \alias{scale_size_manual} \alias{scale_shape_manual} \alias{scale_linetype_manual} \alias{ScaleManual} \alias{scale_color_manual} \title{scale\_manual} \description{Create your own discrete scale} \details{ This page describe...
/man/scale_manual.rd
no_license
genome-vendor/r-cran-ggplot2
R
false
false
2,030
rd
\name{scale_manual} \alias{scale_manual} \alias{scale_colour_manual} \alias{scale_fill_manual} \alias{scale_size_manual} \alias{scale_shape_manual} \alias{scale_linetype_manual} \alias{ScaleManual} \alias{scale_color_manual} \title{scale\_manual} \description{Create your own discrete scale} \details{ This page describe...
#!/usr/bin/env Rscript ########################################################### ## Required libraries ########################################################### library("ggplot2") library("tidyverse") library("dplyr") library("tidyr") library("reshape2") library("sp") library("sf") library("rgdal") library("virid...
/analysis/002_mapping_mortality/bin/mapping_mortality.R
no_license
KarolBL/Atlas-CDMX
R
false
false
7,165
r
#!/usr/bin/env Rscript ########################################################### ## Required libraries ########################################################### library("ggplot2") library("tidyverse") library("dplyr") library("tidyr") library("reshape2") library("sp") library("sf") library("rgdal") library("virid...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.trait.data.R \name{get.trait.data.pft} \alias{get.trait.data.pft} \title{Gets trait data from the database} \usage{ get.trait.data.pft(pft, modeltype, dbfiles, dbcon, forceupdate = FALSE, trait.names = traitdictionary$id) } \arguments{ ...
/db/man/get.trait.data.pft.Rd
permissive
Kah5/pecan
R
false
true
841
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.trait.data.R \name{get.trait.data.pft} \alias{get.trait.data.pft} \title{Gets trait data from the database} \usage{ get.trait.data.pft(pft, modeltype, dbfiles, dbcon, forceupdate = FALSE, trait.names = traitdictionary$id) } \arguments{ ...
library(elasticnet) library(multicore) act = read.table("/Users/junehawk/Desktop/pathologist/act_all.txt", header=TRUE, sep="\t"); ds = read.table("Dream7/DrugSensitivity1/DREAM7_DrugSensitivity1_Drug_Response_Training.txt", header=TRUE, row.names=1); act_cellines = colnames(act) drug_cellines = colnames(ds) activity ...
/PActivity.R
no_license
junehawk/DreamCodes
R
false
false
1,513
r
library(elasticnet) library(multicore) act = read.table("/Users/junehawk/Desktop/pathologist/act_all.txt", header=TRUE, sep="\t"); ds = read.table("Dream7/DrugSensitivity1/DREAM7_DrugSensitivity1_Drug_Response_Training.txt", header=TRUE, row.names=1); act_cellines = colnames(act) drug_cellines = colnames(ds) activity ...
suppressPackageStartupMessages({ library(scater) library(SingleCellExperiment) library(consensusOV) library(EnrichmentBrowser) library(SingleR) }) snr <- commandArgs()[8] sample_num = paste0("sample", snr) data.dir = "/nobackup/16tb_b/scRNA/10x_genomics/" sample.dir = file.path(data.dir, snr) plot...
/inst/scripts/sc_annotate.R
no_license
waldronlab/subtypeHeterogeneity
R
false
false
4,502
r
suppressPackageStartupMessages({ library(scater) library(SingleCellExperiment) library(consensusOV) library(EnrichmentBrowser) library(SingleR) }) snr <- commandArgs()[8] sample_num = paste0("sample", snr) data.dir = "/nobackup/16tb_b/scRNA/10x_genomics/" sample.dir = file.path(data.dir, snr) plot...
function (x, l, r) { e <- get("data.env", .GlobalEnv) e[["mean_help"]][[length(e[["mean_help"]]) + 1]] <- list(x = x, l = l, r = r) .Call("_mosum_mean_help", x, l, r) }
/valgrind_test_dir/mean_help-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
191
r
function (x, l, r) { e <- get("data.env", .GlobalEnv) e[["mean_help"]][[length(e[["mean_help"]]) + 1]] <- list(x = x, l = l, r = r) .Call("_mosum_mean_help", x, l, r) }
# Data types and atomic vector # 3 March 2021 # Masoumeh Khodaverdi #-------------------------
/DataTypeAtomicVector.R
permissive
MassiKhodave/Massi-Khodaverdi
R
false
false
95
r
# Data types and atomic vector # 3 March 2021 # Masoumeh Khodaverdi #-------------------------
#' Plot the number of theoretical random fragments #' #' This simple function allows plotting the expected number of theoretical fragments from random fragmentation of peptides/proteins (in mass spectrometry). #' Here, only the pure fragmentation without any variable fragmentation is considered, all fragment-sizes a...
/R/plotNTheor.R
no_license
cran/wrTopDownFrag
R
false
false
2,215
r
#' Plot the number of theoretical random fragments #' #' This simple function allows plotting the expected number of theoretical fragments from random fragmentation of peptides/proteins (in mass spectrometry). #' Here, only the pure fragmentation without any variable fragmentation is considered, all fragment-sizes a...
#Make sure you're in the folder where your data is setwd() #df, long format data - The data we used the first week load("MT_Pilot20190314.R") df <- subset(df, ID == unique(df$ID)[1] & GainLoss == unique(df$GainLoss)[1] & Trial == unique(df$Trial)[1] ) #df <- df[85:91,] #calculate euclidian distance.... correct_ma...
/Ida Selbing-Mousestrap.R
no_license
astridendrup/models-of-perception-and-action
R
false
false
3,132
r
#Make sure you're in the folder where your data is setwd() #df, long format data - The data we used the first week load("MT_Pilot20190314.R") df <- subset(df, ID == unique(df$ID)[1] & GainLoss == unique(df$GainLoss)[1] & Trial == unique(df$Trial)[1] ) #df <- df[85:91,] #calculate euclidian distance.... correct_ma...
#' Boxplot comparing the distribution of variance in metabolic measurements across the pathways #' #' @param met MultiAssayExperiment object with slots "raw", "imputed", "norm" and "norm_imputed" #' @param rowAnnotation character name of rowAnnotation to stratify metabolites #' @return Boxplot comparing the distributio...
/R/variance_boxplot.R
no_license
biopaw/MetaboDiff
R
false
false
1,006
r
#' Boxplot comparing the distribution of variance in metabolic measurements across the pathways #' #' @param met MultiAssayExperiment object with slots "raw", "imputed", "norm" and "norm_imputed" #' @param rowAnnotation character name of rowAnnotation to stratify metabolites #' @return Boxplot comparing the distributio...
library(tidyr) library(parallel) library(ggplot2) library(genefilter) library(raster) library(RColorBrewer) #library(xmsPANDA) library(gplots) theme_set(theme_classic()) find.Overlapping <- function (dataA, dataB, mz.thresh = 10, time.thresh = 30, best_one=FALSE) { data_a <- as.data.frame(dataA) data_b <- as.data...
/xmsPANDA_v1.1.4_test_additional/R/source_codes/xMSquant_v0.0.3.R
no_license
chunyuma/xmsPANDA_shinyapp
R
false
false
45,798
r
library(tidyr) library(parallel) library(ggplot2) library(genefilter) library(raster) library(RColorBrewer) #library(xmsPANDA) library(gplots) theme_set(theme_classic()) find.Overlapping <- function (dataA, dataB, mz.thresh = 10, time.thresh = 30, best_one=FALSE) { data_a <- as.data.frame(dataA) data_b <- as.data...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/query.r \name{basic_query} \alias{basic_query} \title{Basic Query} \usage{ basic_query(url, col.spec) } \arguments{ \item{url}{The query URL.} } \value{ A dataframe. } \description{ Helper function for CDEC query handling. } ...
/man/basic_query.Rd
no_license
cran/cder
R
false
true
340
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/query.r \name{basic_query} \alias{basic_query} \title{Basic Query} \usage{ basic_query(url, col.spec) } \arguments{ \item{url}{The query URL.} } \value{ A dataframe. } \description{ Helper function for CDEC query handling. } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tri_tri_recycling_process.R \name{tri_tri_recycling_process} \alias{tri_tri_recycling_process} \title{Retrieve tri recycling process data from tri database} \usage{ tri_tri_recycling_process(DOC_CTRL_NUM = NULL, ONSITE_RECYCLING_PROC_CODE =...
/man/tri_tri_recycling_process.Rd
no_license
markwh/envirofacts
R
false
true
530
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tri_tri_recycling_process.R \name{tri_tri_recycling_process} \alias{tri_tri_recycling_process} \title{Retrieve tri recycling process data from tri database} \usage{ tri_tri_recycling_process(DOC_CTRL_NUM = NULL, ONSITE_RECYCLING_PROC_CODE =...
# load csv file to data frame bank <- read.csv("Databank_1.csv", stringsAsFactors=FALSE) # delete eccessive rows bank <- bank[-(4921:4925),] # create new data frame for 2012 data with 1 row per country bank2012 <- data.frame(Country.Name=c("Afghanistan"),Country.Code=c("AFG"),NY.GDP.MKTP.KD.ZG=c(0), NY.GDP.M...
/milestone_1.r
no_license
MakotoAsami/INST737
R
false
false
3,348
r
# load csv file to data frame bank <- read.csv("Databank_1.csv", stringsAsFactors=FALSE) # delete eccessive rows bank <- bank[-(4921:4925),] # create new data frame for 2012 data with 1 row per country bank2012 <- data.frame(Country.Name=c("Afghanistan"),Country.Code=c("AFG"),NY.GDP.MKTP.KD.ZG=c(0), NY.GDP.M...
library(PBSmodelling) ### Name: findPat ### Title: Search a Character Vector to Find Multiple Patterns ### Aliases: findPat ### Keywords: utilities ### ** Examples local(envir=.PBSmodEnv,expr={ #find all strings with a vowel, or that start with a number print(findPat(c("[aeiou]", "^[0-9]"), c("hello", "WORLD", ...
/data/genthat_extracted_code/PBSmodelling/examples/findPat.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
337
r
library(PBSmodelling) ### Name: findPat ### Title: Search a Character Vector to Find Multiple Patterns ### Aliases: findPat ### Keywords: utilities ### ** Examples local(envir=.PBSmodEnv,expr={ #find all strings with a vowel, or that start with a number print(findPat(c("[aeiou]", "^[0-9]"), c("hello", "WORLD", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/o3_max_mm8h_d.R \docType{data} \name{o3_max_mm8h_d} \alias{o3_max_mm8h_d} \title{Tibble con i dati di o3_max_mm8h_d per 33 stazioni della regione EMILIAROMAGNA} \format{ Un tibble con 8 colonne e 24123 osservazioni } \usage{ o3_max_mm8h_d } \...
/man/o3_max_mm8h_d.Rd
permissive
progettopulvirus/emiliaromagna
R
false
true
433
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/o3_max_mm8h_d.R \docType{data} \name{o3_max_mm8h_d} \alias{o3_max_mm8h_d} \title{Tibble con i dati di o3_max_mm8h_d per 33 stazioni della regione EMILIAROMAGNA} \format{ Un tibble con 8 colonne e 24123 osservazioni } \usage{ o3_max_mm8h_d } \...
context("RHG_graph") # Compare to values in the regional_curve_graphs data frame test_that("dimensionType = 'area'", { expect_equal(RHG_graph(region = "Eastern United States", drainageArea = 1, dimensionType = "area"), 23.0, tolerance = 1e-4) expect_equal(RHG_graph(region ...
/tests/testthat/test_RHG_graph.R
permissive
FluvialGeomorph/RegionalCurve
R
false
false
1,229
r
context("RHG_graph") # Compare to values in the regional_curve_graphs data frame test_that("dimensionType = 'area'", { expect_equal(RHG_graph(region = "Eastern United States", drainageArea = 1, dimensionType = "area"), 23.0, tolerance = 1e-4) expect_equal(RHG_graph(region ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.configservice_operations.R \name{get_compliance_summary_by_config_rule} \alias{get_compliance_summary_by_config_rule} \title{Returns the number of AWS Config rules that are compliant and noncompliant, up to a maximum of 25 for each} \usa...
/service/paws.configservice/man/get_compliance_summary_by_config_rule.Rd
permissive
CR-Mercado/paws
R
false
true
490
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.configservice_operations.R \name{get_compliance_summary_by_config_rule} \alias{get_compliance_summary_by_config_rule} \title{Returns the number of AWS Config rules that are compliant and noncompliant, up to a maximum of 25 for each} \usa...
dataset<-read.csv("household_power_consumption.txt",sep=";",na.strings="?") filtdata<-dataset[as.Date(dataset$Date,format="%d/%m/%Y") %in% c(as.Date("2007-02-01",format="%Y-%m-%d"),as.Date("2007-02-02",format="%Y-%m-%d")),] datetimes<-as.POSIXct(paste(filtdata$Date, filtdata$Time), format="%d/%m/%Y %H:%M:%S") png(filen...
/exdata_data_household_power_consumption/plot2.R
no_license
awr25/ExData_Plotting1
R
false
false
480
r
dataset<-read.csv("household_power_consumption.txt",sep=";",na.strings="?") filtdata<-dataset[as.Date(dataset$Date,format="%d/%m/%Y") %in% c(as.Date("2007-02-01",format="%Y-%m-%d"),as.Date("2007-02-02",format="%Y-%m-%d")),] datetimes<-as.POSIXct(paste(filtdata$Date, filtdata$Time), format="%d/%m/%Y %H:%M:%S") png(filen...
makeTime2Event <- function(data) { data$time <- 'no_event' if (sum(data$eventFlag, na.rm=T) == 0 ) { return(data[,time:=factor(time, levels=c("no_event", "b3","b2","b1","ev","a1","a2","a3"))]) } trainLength <- nrow(data) if (nrow(data[eventFlag == 1] >= 1)) { for (i in 1:trai...
/makeTime2Event.R
no_license
bushmanov/R_Kaggle_WalMart_Sales
R
false
false
1,898
r
makeTime2Event <- function(data) { data$time <- 'no_event' if (sum(data$eventFlag, na.rm=T) == 0 ) { return(data[,time:=factor(time, levels=c("no_event", "b3","b2","b1","ev","a1","a2","a3"))]) } trainLength <- nrow(data) if (nrow(data[eventFlag == 1] >= 1)) { for (i in 1:trai...
library(shiny) library(shinyWidgets) library(shinydashboard) library(shinydashboardPlus) library(leaflet) library(dashboardthemes) library(readr) library(collapsibleTree) library(tidyverse) library(viridis) library(sf) library(mapview) library(dplyr) library(tidycensus) library(sp) library(readxl) source("theme.R") #G...
/ShinyFinalPresentation/DSPGWytheCounty.R
no_license
jpbeverly/Project_Wythe_County
R
false
false
31,432
r
library(shiny) library(shinyWidgets) library(shinydashboard) library(shinydashboardPlus) library(leaflet) library(dashboardthemes) library(readr) library(collapsibleTree) library(tidyverse) library(viridis) library(sf) library(mapview) library(dplyr) library(tidycensus) library(sp) library(readxl) source("theme.R") #G...
\name{murdoch} \alias{murdoch} \alias{summary.murdoch} \alias{plot.murdoch} \alias{print.murdoch} \title{Indicator Species Analysis by Murdoch Preference Function} \description{Calculates the indicator value of species in a single cluster or environment type using the Murdoch Preference Function} \usage{ murdoch(com...
/man/murdoch.Rd
no_license
cran/optpart
R
false
false
3,458
rd
\name{murdoch} \alias{murdoch} \alias{summary.murdoch} \alias{plot.murdoch} \alias{print.murdoch} \title{Indicator Species Analysis by Murdoch Preference Function} \description{Calculates the indicator value of species in a single cluster or environment type using the Murdoch Preference Function} \usage{ murdoch(com...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/burndown.R \name{read.burndown} \alias{read.burndown} \title{Scan burndown data file} \usage{ read.burndown(file, debug = FALSE) } \arguments{ \item{file}{a connection or a character string giving the name of the file to load.} \item{debug}{...
/man/read.burndown.Rd
no_license
marcel111/plan
R
false
true
3,396
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/burndown.R \name{read.burndown} \alias{read.burndown} \title{Scan burndown data file} \usage{ read.burndown(file, debug = FALSE) } \arguments{ \item{file}{a connection or a character string giving the name of the file to load.} \item{debug}{...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/extractMoments.r \name{binnedMean} \alias{binnedMean} \title{Calculate the mean for a matrix of binned data} \usage{ binnedMean(counts, lowerBounds = seq(0, 95, 5), upperBounds = seq(5, 100, 5)) } \arguments{ \item{counts}{a \code{m...
/man/binnedMean.Rd
no_license
aserlich/gameify
R
false
false
873
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/extractMoments.r \name{binnedMean} \alias{binnedMean} \title{Calculate the mean for a matrix of binned data} \usage{ binnedMean(counts, lowerBounds = seq(0, 95, 5), upperBounds = seq(5, 100, 5)) } \arguments{ \item{counts}{a \code{m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset_methods.R \name{dataset_shard} \alias{dataset_shard} \title{Creates a dataset that includes only 1 / num_shards of this dataset.} \usage{ dataset_shard(dataset, num_shards, index) } \arguments{ \item{dataset}{A dataset} \item{num_sha...
/man/dataset_shard.Rd
no_license
rstudio/tfdatasets
R
false
true
636
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset_methods.R \name{dataset_shard} \alias{dataset_shard} \title{Creates a dataset that includes only 1 / num_shards of this dataset.} \usage{ dataset_shard(dataset, num_shards, index) } \arguments{ \item{dataset}{A dataset} \item{num_sha...
general_data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE, dec=".") data<-subset(general_data, general_data$Date == "1/2/2007" | general_data$Date == "2/2/2007") data$Global_active_power<-as.numeric(data$Global_active_power) Time <- strptime(paste(data$Date, data$Time, sep=...
/Plot2.R
no_license
Serge11/ExData_Plotting1
R
false
false
496
r
general_data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE, dec=".") data<-subset(general_data, general_data$Date == "1/2/2007" | general_data$Date == "2/2/2007") data$Global_active_power<-as.numeric(data$Global_active_power) Time <- strptime(paste(data$Date, data$Time, sep=...
# # Purpose: To parse respiration for middle Loire data # Author: Jake Diamond # Date: September 24, 2019 # # Set working directory # setwd("Z:/Loire_DO") setwd("C:/Users/jake.diamond/Documents/Backup of Network/Loire_DO") # Load libraries library(tidyverse) library(lubridate) library(quantreg) library(broom) # Lo...
/autotrophic_respiration.R
no_license
hlowman/Loire_DO
R
false
false
1,349
r
# # Purpose: To parse respiration for middle Loire data # Author: Jake Diamond # Date: September 24, 2019 # # Set working directory # setwd("Z:/Loire_DO") setwd("C:/Users/jake.diamond/Documents/Backup of Network/Loire_DO") # Load libraries library(tidyverse) library(lubridate) library(quantreg) library(broom) # Lo...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/heatmap.3.R \name{heatmap.3} \alias{heatmap.3} \title{heatmap.3 An improved heatmap plotting} \usage{ heatmap.3(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("both", "row", "...
/man/heatmap.3.Rd
no_license
hjanime/cogena
R
false
false
1,473
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/heatmap.3.R \name{heatmap.3} \alias{heatmap.3} \title{heatmap.3 An improved heatmap plotting} \usage{ heatmap.3(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("both", "row", "...
#! /usr/bin/env Rscript .suppress <- suppressPackageStartupMessages .suppress(library(neuroim)) .suppress(library(neurosurf)) .suppress(library(rMVPA)) .suppress(library(optparse)) .suppress(library(caret)) .suppress(library(futile.logger)) .suppress(library(io)) .suppress(library(doParallel)) ## should be able to...
/scripts/MVPA_Regional.R
no_license
hillhillll/rMVPA
R
false
false
8,137
r
#! /usr/bin/env Rscript .suppress <- suppressPackageStartupMessages .suppress(library(neuroim)) .suppress(library(neurosurf)) .suppress(library(rMVPA)) .suppress(library(optparse)) .suppress(library(caret)) .suppress(library(futile.logger)) .suppress(library(io)) .suppress(library(doParallel)) ## should be able to...
#---########################################### #--- title: "RICT IV Helper files version 1" #--- output: html_document #--- Author: Dr K. M Muyeba aka Maybin #--- ######################################### #####################################################################################################...
/supportfunctions/Helperfunctionsv1.R
no_license
Maybin/RICT
R
false
false
28,129
r
#---########################################### #--- title: "RICT IV Helper files version 1" #--- output: html_document #--- Author: Dr K. M Muyeba aka Maybin #--- ######################################### #####################################################################################################...
## Save matrix inverse compute time by caching inverses ## and retrieving rather than re-computing ## Create "matrix" that can cache its inverse makeCacheMatrix <- function(mtoinvert = matrix()) { #clear inverse if defining a new "matrix" (list containing the 4 functions) inv <- NULL #replace ...
/cachematrix.R
no_license
jwebsterlove/ProgrammingAssignment2
R
false
false
1,639
r
## Save matrix inverse compute time by caching inverses ## and retrieving rather than re-computing ## Create "matrix" that can cache its inverse makeCacheMatrix <- function(mtoinvert = matrix()) { #clear inverse if defining a new "matrix" (list containing the 4 functions) inv <- NULL #replace ...
#for 1 library("TDA") file_list=list.files("./4/eps/",pattern = "*.csv") for (i in file_list){ zz=paste("./4/eps/",i,sep='') print(zz) X<-read.csv(zz) #summary(X) #Creating grid by<-0.1 margin_x<-seq(0,200,by=by) margin_y<-seq(5,35,by=by) #Grid=expand.grid(margin_x,margin_y) #plot(Grid) #DiagGrid...
/TDA_exp/4_code.R
no_license
Jayanth-kumar5566/TDA
R
false
false
971
r
#for 1 library("TDA") file_list=list.files("./4/eps/",pattern = "*.csv") for (i in file_list){ zz=paste("./4/eps/",i,sep='') print(zz) X<-read.csv(zz) #summary(X) #Creating grid by<-0.1 margin_x<-seq(0,200,by=by) margin_y<-seq(5,35,by=by) #Grid=expand.grid(margin_x,margin_y) #plot(Grid) #DiagGrid...
# Get the CEMS data and generate design matrix example(wide2long, package="ordBTL", echo=FALSE) des2 <- design(CEMSlong[-which(is.na(CEMSlong$Y)),], var1="object1", var2="object2", use.vars="ALL", reference="Stockholm") # Formula for full model considering all subject-object int...
/inst/examples/BTLboost_ex.R
no_license
giuseppec/ordBTL
R
false
false
744
r
# Get the CEMS data and generate design matrix example(wide2long, package="ordBTL", echo=FALSE) des2 <- design(CEMSlong[-which(is.na(CEMSlong$Y)),], var1="object1", var2="object2", use.vars="ALL", reference="Stockholm") # Formula for full model considering all subject-object int...
####################################################################################################################### # # # Name: big_table ...
/sub_codes/02_big_table_v5.R
no_license
PaTomb/eu_efficiency_figtabs
R
false
false
9,080
r
####################################################################################################################### # # # Name: big_table ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fringeColValidations.R \name{fringeColVal_hasGenderLevelsEs} \alias{fringeColVal_hasGenderLevelsEs} \title{fringeColVal_hasGenderLevelsEs} \usage{ fringeColVal_hasGenderLevelsEs(fringe, cols) } \description{ fringeColVal_hasGenderLevelsEs }
/man/fringeColVal_hasGenderLevelsEs.Rd
no_license
isciolab/datafringe
R
false
true
320
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fringeColValidations.R \name{fringeColVal_hasGenderLevelsEs} \alias{fringeColVal_hasGenderLevelsEs} \title{fringeColVal_hasGenderLevelsEs} \usage{ fringeColVal_hasGenderLevelsEs(fringe, cols) } \description{ fringeColVal_hasGenderLevelsEs }
model { for( k in 1 : ncounts ) { # the p_forest[k]*0.5 centers the percent forest values so that the intercepts represent the mean abundance (when p_forest == 0.5, 50% forest), instead of the abundance when p_forest == 0 # this is relatively simple to change, depending on the range of your p_forest values log(l...
/example.model.r
no_license
AdamCSmithCWS/space_time
R
false
false
8,739
r
model { for( k in 1 : ncounts ) { # the p_forest[k]*0.5 centers the percent forest values so that the intercepts represent the mean abundance (when p_forest == 0.5, 50% forest), instead of the abundance when p_forest == 0 # this is relatively simple to change, depending on the range of your p_forest values log(l...
\name{agree} \alias{agree} \title{Agreement Between Partitions} \description{ Evaluates the agreement of a given partition with respect to the partition arising from the mixture of multivariate contaminated normal distributions. If the mixture has been fitted for classification purposes, the agreement will be base...
/man/agree.Rd
no_license
cran/ContaminatedMixt
R
false
false
1,756
rd
\name{agree} \alias{agree} \title{Agreement Between Partitions} \description{ Evaluates the agreement of a given partition with respect to the partition arising from the mixture of multivariate contaminated normal distributions. If the mixture has been fitted for classification purposes, the agreement will be base...
# ==================== # source all functions # ==================== source_path <- "./src/functions/" files <- list.files(source_path) for (f in files) source(paste(source_path,f, sep="")) # ============ # loading data # ============ answers <- read.table("./src/data/answers.csv", header=T, sep=",", stringsAsF...
/src/validate_submission.R
no_license
dewaldayres/titanic
R
false
false
1,240
r
# ==================== # source all functions # ==================== source_path <- "./src/functions/" files <- list.files(source_path) for (f in files) source(paste(source_path,f, sep="")) # ============ # loading data # ============ answers <- read.table("./src/data/answers.csv", header=T, sep=",", stringsAsF...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584178476307e+77, 9.53818252170339e+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, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615780887-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
348
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584178476307e+77, 9.53818252170339e+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, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
#' Get the Default ggplot2 Color Palette #' #' \code{gg_color_hue} returns the default ggplot color palette for a given #' number of colors #' #' @author John Colby \url{http://stackoverflow.com/questions/8197559/emulate-ggplot2-default-color-palette} # #' @param n Number of Coolors #' @export gg_color_hue <- function...
/R/gg_color_hue.R
no_license
LCedrig/tinyutils
R
false
false
394
r
#' Get the Default ggplot2 Color Palette #' #' \code{gg_color_hue} returns the default ggplot color palette for a given #' number of colors #' #' @author John Colby \url{http://stackoverflow.com/questions/8197559/emulate-ggplot2-default-color-palette} # #' @param n Number of Coolors #' @export gg_color_hue <- function...
qplot(age, color=y, data=bank) qplot(age, job, color=y, data=bank) qplot(poutcome, data=bank, ylab="Number of Records", fill=poutcome) qplot(poutcome, color=y, data=bank, xlab="poutcome", ylab="Number of answers")+facet_grid(~y) qplot(y, data=bank) qplot(pdays, color=y, ylab="Number of Records", data=bank)...
/other/charts_visualization.R
no_license
anna-kay/Bank-Marketing-Dataset-classification-clustering
R
false
false
435
r
qplot(age, color=y, data=bank) qplot(age, job, color=y, data=bank) qplot(poutcome, data=bank, ylab="Number of Records", fill=poutcome) qplot(poutcome, color=y, data=bank, xlab="poutcome", ylab="Number of answers")+facet_grid(~y) qplot(y, data=bank) qplot(pdays, color=y, ylab="Number of Records", data=bank)...
library(readr) library(dplyr) library(ggplot2) library(forcats) library(wordcloud) library(tidytext) library(tm) library(topicmodels) library(SnowballC) library(LDAvis) library(tidyverse) require(scales) # import data files, merge and remove duplicates # if city is missing, filling in with the broad city, i.e, la, s...
/job_posting.R
no_license
zhouqianru91/glassdoor
R
false
false
22,671
r
library(readr) library(dplyr) library(ggplot2) library(forcats) library(wordcloud) library(tidytext) library(tm) library(topicmodels) library(SnowballC) library(LDAvis) library(tidyverse) require(scales) # import data files, merge and remove duplicates # if city is missing, filling in with the broad city, i.e, la, s...
library(pamctdp) ### Name: multilingual ### Title: Multilingual Free Responses Data ### Aliases: multilingual ### Keywords: datasets ### ** Examples # MFACT with pamctdp functions data(multilingual) # simple correspondence analysis sca <- dudi.coa(multilingual$tab,scannf=FALSE,nf=2) # MFACT analysis mfact <- witwi...
/data/genthat_extracted_code/pamctdp/examples/multilingual.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,012
r
library(pamctdp) ### Name: multilingual ### Title: Multilingual Free Responses Data ### Aliases: multilingual ### Keywords: datasets ### ** Examples # MFACT with pamctdp functions data(multilingual) # simple correspondence analysis sca <- dudi.coa(multilingual$tab,scannf=FALSE,nf=2) # MFACT analysis mfact <- witwi...
/Caso 2 Calidad de Hospitales/mejor.R
no_license
IvankaMorales/Programaci-n_Actuarial_III
R
false
false
1,115
r
#' Decode Google polyline of an activity into latitude and longitude #' #' Decodes Google's polyline that are given in get_activity() and get_activity_list() #' #' @author Daniel Padfield #' @param Google_polyline character element of Google polyline of an activity #' @return A vector of latitudes an longitudes in de...
/R/decode_Polyline.R
permissive
amillang/rStrava
R
false
false
2,207
r
#' Decode Google polyline of an activity into latitude and longitude #' #' Decodes Google's polyline that are given in get_activity() and get_activity_list() #' #' @author Daniel Padfield #' @param Google_polyline character element of Google polyline of an activity #' @return A vector of latitudes an longitudes in de...
\name{pa3} \docType{data} \alias{pa3} \title{An example of reformated individual activity data} \description{ 'pa3' is in tbl_df format. It has 13 observations for 3 individuals, and the variables are "ID", "ID_Nday" (the ith day observation for an individual), and activity. The activity variable is an embedded list ...
/man/pa3.Rd
no_license
JianWang2016/PML
R
false
false
440
rd
\name{pa3} \docType{data} \alias{pa3} \title{An example of reformated individual activity data} \description{ 'pa3' is in tbl_df format. It has 13 observations for 3 individuals, and the variables are "ID", "ID_Nday" (the ith day observation for an individual), and activity. The activity variable is an embedded list ...
#*****************************************************## # FULL YEAR DATA #### #*****************************************************## #Raw data: # Temperature 2-4 times a day, 3 loggers per plot, total 12 sites and 72 samples # Two datasets from two data off-loads: # . May-Aug for each logger # . Aug-May for...
/temperature script_new.R
no_license
anders-kolstad/soilTemperature
R
false
false
152,717
r
#*****************************************************## # FULL YEAR DATA #### #*****************************************************## #Raw data: # Temperature 2-4 times a day, 3 loggers per plot, total 12 sites and 72 samples # Two datasets from two data off-loads: # . May-Aug for each logger # . Aug-May for...
#!/usr/bin/Rscript library(dplyr, warn.conflicts = FALSE) library(purrr, warn.conflicts = FALSE) library(desc, warn.conflicts = FALSE) library(devtools, warn.conflicts = FALSE) requireNamespace("igraph", quietly = TRUE) setRepositories(ind=1:4) # find local repositories files <- list.files(path = ".", pattern = "D...
/helper_scripts/install_dynpackages.R
permissive
amnahsiddiqa/dynverse
R
false
false
2,890
r
#!/usr/bin/Rscript library(dplyr, warn.conflicts = FALSE) library(purrr, warn.conflicts = FALSE) library(desc, warn.conflicts = FALSE) library(devtools, warn.conflicts = FALSE) requireNamespace("igraph", quietly = TRUE) setRepositories(ind=1:4) # find local repositories files <- list.files(path = ".", pattern = "D...
# weighted quantile weighted_quantile <- function(x, w, probs, na.rm = FALSE) { dat <- .check_data_weights(x, w, na.rm) if (is.null(dat)) return(NA) if (any(probs < 0) || any(probs > 1)) stop("Argument 'probs' not in [0, 1]\n", call. = FALSE) res <- NULL for (i in 1:length(p...
/R/weighted_quantile.R
no_license
cran/robsurvey
R
false
false
629
r
# weighted quantile weighted_quantile <- function(x, w, probs, na.rm = FALSE) { dat <- .check_data_weights(x, w, na.rm) if (is.null(dat)) return(NA) if (any(probs < 0) || any(probs > 1)) stop("Argument 'probs' not in [0, 1]\n", call. = FALSE) res <- NULL for (i in 1:length(p...
get_primes_under_n <- function (n) { num_seq = seq(3, n, 2) prime_number = numeric() while(length(num_seq) >= 1) { prime_number = c(prime_number, num_seq[1]) num_seq = setdiff(num_seq, seq(num_seq[1], n, num_seq[1])) } return(c(2, prime_number)) }
/31-40/35. Get_Primes_Under_n.R
no_license
shahronak47/Project-Euler
R
false
false
266
r
get_primes_under_n <- function (n) { num_seq = seq(3, n, 2) prime_number = numeric() while(length(num_seq) >= 1) { prime_number = c(prime_number, num_seq[1]) num_seq = setdiff(num_seq, seq(num_seq[1], n, num_seq[1])) } return(c(2, prime_number)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ils.fqcs.R \name{func.ils.formula} \alias{func.ils.formula} \title{Descriptive measures for functional data.} \usage{ func.ils.formula(formula, data = NULL, drop = FALSE, func = func.mean) } \arguments{ \item{formula}{A formula, such...
/man/func.ils.formula.Rd
no_license
cran/ILS
R
false
true
854
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ils.fqcs.R \name{func.ils.formula} \alias{func.ils.formula} \title{Descriptive measures for functional data.} \usage{ func.ils.formula(formula, data = NULL, drop = FALSE, func = func.mean) } \arguments{ \item{formula}{A formula, such...
aode <- function(formula, data) { # HELPER FUNCTIONS # m-estimation mest <- function(v, m, p0=1/m) { if(m == 0) { ifelse(v == 0, 0, v/sum(v)) } else { (v + m * p0)/(sum(v) + m) } } #MAIN #class cl <- all.vars(formula[[2]]) #attributes attrs <- attributes(data[,...
/src/aode.R
no_license
pguz/RAODE
R
false
false
3,368
r
aode <- function(formula, data) { # HELPER FUNCTIONS # m-estimation mest <- function(v, m, p0=1/m) { if(m == 0) { ifelse(v == 0, 0, v/sum(v)) } else { (v + m * p0)/(sum(v) + m) } } #MAIN #class cl <- all.vars(formula[[2]]) #attributes attrs <- attributes(data[,...
context("Ensuring that the `fmt_missing()` function works as expected") test_that("the `fmt_missing()` function works correctly", { # Create an input data frame with two columns, both numeric data_tbl <- data.frame( num_1 = c(NA, 74, NA, 93, NA, 76, NA), num_2 = c(34, 74, 23, 93, 35, 76, 57), ...
/tests/testthat/test-fmt_missing.R
permissive
79W/gt
R
false
false
3,350
r
context("Ensuring that the `fmt_missing()` function works as expected") test_that("the `fmt_missing()` function works correctly", { # Create an input data frame with two columns, both numeric data_tbl <- data.frame( num_1 = c(NA, 74, NA, 93, NA, 76, NA), num_2 = c(34, 74, 23, 93, 35, 76, 57), ...
# Ranking hospitals by outcome in a state # state: string of length 2 with the state abbreviation # outcome: can be one of “heart attack”, “heart failure”, or “pneumonia” # heart attack: 11, heart failure: 17, pneumonia: 23 rankHospitals <- function(state, outcome, rank) { # validate state if(!any(data$State == sta...
/2. R-Programming/Week-4/task-3.R
no_license
Waqar-107/Data-Science-Specialization-Coursera
R
false
false
1,098
r
# Ranking hospitals by outcome in a state # state: string of length 2 with the state abbreviation # outcome: can be one of “heart attack”, “heart failure”, or “pneumonia” # heart attack: 11, heart failure: 17, pneumonia: 23 rankHospitals <- function(state, outcome, rank) { # validate state if(!any(data$State == sta...
# Build a VERY basic encounter history for the entire 2016 season # Kelsey Wellington # 1/24/2018 tia <- read.csv("C:/Users/kelsey.wellington/Desktop/Data/2016/clean_tia.csv", as.is = T) tia$date <- as.Date(tia$date) # this bit is unneccessary -- playing around # cam_lst <- as.character(unique(tia$cam_id)) # creates ...
/Data Management/2016/wolf_obs.R
no_license
kawellington/Thesis
R
false
false
1,695
r
# Build a VERY basic encounter history for the entire 2016 season # Kelsey Wellington # 1/24/2018 tia <- read.csv("C:/Users/kelsey.wellington/Desktop/Data/2016/clean_tia.csv", as.is = T) tia$date <- as.Date(tia$date) # this bit is unneccessary -- playing around # cam_lst <- as.character(unique(tia$cam_id)) # creates ...