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/cokrig.R \name{cokrig.regression} \alias{cokrig.regression} \title{Performs local linear regressions on co-kriged OFE data.} \usage{ cokrig.regression(data, rates) } \arguments{ \item{data}{SpatialPointsDataFrame output (on a grid) from globa...
/man/cokrig.regression.Rd
permissive
fionahevans/OFE
R
false
true
649
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cokrig.R \name{cokrig.regression} \alias{cokrig.regression} \title{Performs local linear regressions on co-kriged OFE data.} \usage{ cokrig.regression(data, rates) } \arguments{ \item{data}{SpatialPointsDataFrame output (on a grid) from globa...
getwd() setwd("C:/Users/Lisa/version-control/ExData_Plotting1") filename <- "exdata-data-househousehold_Power_Consumption.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileURL, fi...
/plot4.r
no_license
lisakyuan/ExData_Plotting1
R
false
false
2,000
r
getwd() setwd("C:/Users/Lisa/version-control/ExData_Plotting1") filename <- "exdata-data-househousehold_Power_Consumption.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileURL, fi...
require(data.table) require(gtools) nut2008 <- fread("C:/cygwin64/home/amelia.hardjasa/code2015/data/combined_nutrient_value_2008.csv") cols <- c("MENU ITEMS", "Serving Size (g)", "Calories (kcal)", "Calories From Fat", "Total Fat (g)", "Saturated Fat (g)", "Trans Fat (g)", "Cholesterol (mg)", "Sodium (mg)", "Carboh...
/data/supermarkets.R
no_license
ahardjasa/code2015
R
false
false
955
r
require(data.table) require(gtools) nut2008 <- fread("C:/cygwin64/home/amelia.hardjasa/code2015/data/combined_nutrient_value_2008.csv") cols <- c("MENU ITEMS", "Serving Size (g)", "Calories (kcal)", "Calories From Fat", "Total Fat (g)", "Saturated Fat (g)", "Trans Fat (g)", "Cholesterol (mg)", "Sodium (mg)", "Carboh...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/energybalance_functions.R \name{external_resistance_to_water_vapor_transfer} \alias{external_resistance_to_water_vapor_transfer} \title{Calculate external resistance to water vapor transfer} \usage{ external_resistance_to_water_vapor_transfer...
/man/external_resistance_to_water_vapor_transfer.Rd
permissive
Brybrio/TrenchR
R
false
true
1,123
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/energybalance_functions.R \name{external_resistance_to_water_vapor_transfer} \alias{external_resistance_to_water_vapor_transfer} \title{Calculate external resistance to water vapor transfer} \usage{ external_resistance_to_water_vapor_transfer...
heatmap.3 <- function(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("both","row", "column", "none"), symm = FALSE, scale = c("none",...
/packages/heatmap.3.R
no_license
alexplocik/Dscam_Figures
R
false
false
17,213
r
heatmap.3 <- function(x, Rowv = TRUE, Colv = if (symm) "Rowv" else TRUE, distfun = dist, hclustfun = hclust, dendrogram = c("both","row", "column", "none"), symm = FALSE, scale = c("none",...
## Put comments here that give an overall description of what your ## functions do ## reconocer el archivo en r. read the r script #Crear la funcion make cache matrix ## Put comments here that give an overall description of what your ## functions do ## makeCacheMatrix: This function creates a special "matrix" object ...
/cachematrix.R
no_license
osmitar/ProgrammingAssignment2
R
false
false
1,233
r
## Put comments here that give an overall description of what your ## functions do ## reconocer el archivo en r. read the r script #Crear la funcion make cache matrix ## Put comments here that give an overall description of what your ## functions do ## makeCacheMatrix: This function creates a special "matrix" object ...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/eudist.r \name{eudist} \alias{eudist} \title{Earth-Sun distance by day of year} \usage{ eudist(doy) } \arguments{ \item{doy}{numeric. image day-of-year} } \description{ Earth-Sun distance by day of year } \references{ http://landsatha...
/man/eudist.Rd
permissive
dongjwOU/LandsatLinkr
R
false
false
361
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/eudist.r \name{eudist} \alias{eudist} \title{Earth-Sun distance by day of year} \usage{ eudist(doy) } \arguments{ \item{doy}{numeric. image day-of-year} } \description{ Earth-Sun distance by day of year } \references{ http://landsatha...
/数据挖掘/L6_1.R
no_license
aherain/idw-007
R
false
false
1,811
r
rm(list=ls()) dir<-"//falmumapp28/Unilever Singapore (15-AIM-1275)/Users/Vihang/Allstate" setwd(dir) library(data.table) library(dplyr) library(tidyr) library(gtools) ##################################################################################### ##################One Hot Encoding ######################...
/KaggleAllstate2016/Linear Model with all variables and one hot encoding for categorical variables.R
no_license
vihangp/MachineLearning
R
false
false
2,154
r
rm(list=ls()) dir<-"//falmumapp28/Unilever Singapore (15-AIM-1275)/Users/Vihang/Allstate" setwd(dir) library(data.table) library(dplyr) library(tidyr) library(gtools) ##################################################################################### ##################One Hot Encoding ######################...
library(shinymaterial) ### Name: material_dropdown ### Title: Create a shinymaterial dropdown ### Aliases: material_dropdown ### ** Examples material_dropdown( input_id = "example_dropdown", label = "Drop down", choices = c( "Chicken" = "c", "Steak" = "s", "Fish" = "f" ), selected = c("c"), ...
/data/genthat_extracted_code/shinymaterial/examples/material_dropdown.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
363
r
library(shinymaterial) ### Name: material_dropdown ### Title: Create a shinymaterial dropdown ### Aliases: material_dropdown ### ** Examples material_dropdown( input_id = "example_dropdown", label = "Drop down", choices = c( "Chicken" = "c", "Steak" = "s", "Fish" = "f" ), selected = c("c"), ...
# Install Library install.packages(c("readr", "tm", "igraph")) # Import Library library(readr) library(tm) library(igraph) # Import Data df <- read_csv("data/processed//clean-tweet.csv") # Create Corpus corpus <- Corpus(VectorSource(df$text)) corpus <- tm_map( corpus, removeWords, c("dan", "kenapa", "nya", "gu...
/src/004_text-network-visualization.R
no_license
ditopedia/tws
R
false
false
1,540
r
# Install Library install.packages(c("readr", "tm", "igraph")) # Import Library library(readr) library(tm) library(igraph) # Import Data df <- read_csv("data/processed//clean-tweet.csv") # Create Corpus corpus <- Corpus(VectorSource(df$text)) corpus <- tm_map( corpus, removeWords, c("dan", "kenapa", "nya", "gu...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/utils.R \name{equal_length} \alias{equal_length} \title{Check if all list vectors have equal length} \usage{ equal_length(x) } \arguments{ \item{x}{list of vectors} } \value{ logical } \description{ Check if all list vectors have equa...
/man/equal_length.Rd
no_license
fototo/htmltab
R
false
false
332
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/utils.R \name{equal_length} \alias{equal_length} \title{Check if all list vectors have equal length} \usage{ equal_length(x) } \arguments{ \item{x}{list of vectors} } \value{ logical } \description{ Check if all list vectors have equa...
###################################################### ## Functions to generate commonly required objects ## ####################################################### ## std.b: Return the spherical random effects or ## "Standardize" the Matrix matrix: \eqn{\Lambda^{-1} matrix / \sigma}{Lambda^-1 matrix / sigma} ## #...
/R/helpers.R
no_license
Libardo1/robustlmm
R
false
false
25,397
r
###################################################### ## Functions to generate commonly required objects ## ####################################################### ## std.b: Return the spherical random effects or ## "Standardize" the Matrix matrix: \eqn{\Lambda^{-1} matrix / \sigma}{Lambda^-1 matrix / sigma} ## #...
#### libraries #### library(shiny) library(scales) library(ggthemes) library(gt) library(broom) library(vembedr) library(tidyverse) #### load relevant data #### majs_gdps <- read_rds("majs_gdps.rds") issues_majs <- read_rds("issues_majs.rds") all_majs <- read_rds("all_majs.rds") #### menu choices #### country_choi...
/un_app/app.R
no_license
kevpwang/final_un_app
R
false
false
20,579
r
#### libraries #### library(shiny) library(scales) library(ggthemes) library(gt) library(broom) library(vembedr) library(tidyverse) #### load relevant data #### majs_gdps <- read_rds("majs_gdps.rds") issues_majs <- read_rds("issues_majs.rds") all_majs <- read_rds("all_majs.rds") #### menu choices #### country_choi...
library(ape) testtree <- read.tree("11127_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="11127_0_unrooted.txt")
/codeml_files/newick_trees_processed/11127_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("11127_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="11127_0_unrooted.txt")
## Sourcing R function to import dataset source("import_data.R") ## Creating plot 2 plot2 <- function(data=NULL) { if(is.null(data)) data <- import_data() png("plot2.png", width=480, height=480) plot(data$Time, data$Global_active_power, ...
/plot2.R
no_license
AureoZanon/ExData_Plotting1
R
false
false
446
r
## Sourcing R function to import dataset source("import_data.R") ## Creating plot 2 plot2 <- function(data=NULL) { if(is.null(data)) data <- import_data() png("plot2.png", width=480, height=480) plot(data$Time, data$Global_active_power, ...
rm(list = ls()) library(Daniel) library(dplyr) library(nnet) CalcCImultinom <- function(fit) { s <- summary(fit) coef <- s$coefficients ses <- s$standard.errors ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2] ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2] return(rbind(ci.1,ci.2)) } #key # A, B,C,D,E,F - betaE[2] =...
/Simulations/Scripts/R/Rare/Scenario 3/CMPEn50KrareScen3CA.R
no_license
yadevi/CausalMPE
R
false
false
4,218
r
rm(list = ls()) library(Daniel) library(dplyr) library(nnet) CalcCImultinom <- function(fit) { s <- summary(fit) coef <- s$coefficients ses <- s$standard.errors ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2] ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2] return(rbind(ci.1,ci.2)) } #key # A, B,C,D,E,F - betaE[2] =...
require(xts) #' Time of maximum observation #' #' @description Determine the time of the maximum item in the supplied time series. #' @author Peter Metcalfe #' @export time_at_peak #' @param ts Time series #' @param icol Column index if a multi-column time series #' @author Peter Metcalfe #' @examples #' #' require(dy...
/hydro_util.r
no_license
Q-NFM/dynamictopmodel-R
R
false
false
7,636
r
require(xts) #' Time of maximum observation #' #' @description Determine the time of the maximum item in the supplied time series. #' @author Peter Metcalfe #' @export time_at_peak #' @param ts Time series #' @param icol Column index if a multi-column time series #' @author Peter Metcalfe #' @examples #' #' require(dy...
library(sqldf) if(file.exists("project1.Rda")){ load(file="project1.Rda") }else{ sub1 <- read.csv2.sql("household_power_consumption.txt",sql="SELECT * FROM file WHERE Date='1/2/2007' OR Date='2/2/2007'",sep=";",na.strings="?" ) save(sub1,file="project1.Rda") } # plot1 par(mar = c(4,4,4,4)) par(mfrow=c(1,1)) his...
/plot1.R
no_license
josephvoyles/ExData_Plotting1
R
false
false
445
r
library(sqldf) if(file.exists("project1.Rda")){ load(file="project1.Rda") }else{ sub1 <- read.csv2.sql("household_power_consumption.txt",sql="SELECT * FROM file WHERE Date='1/2/2007' OR Date='2/2/2007'",sep=";",na.strings="?" ) save(sub1,file="project1.Rda") } # plot1 par(mar = c(4,4,4,4)) par(mfrow=c(1,1)) his...
#' Creates an R Markdown PDF Thesis document #' #' This is a function called in output in the YAML of the driver Rmd file to specify using the Reed #' Senior Thesis LaTeX template and cls files. #' #' @export #' @param toc A Boolean (TRUE or FALSE) specifying where table of contents should be created #' @param toc_dept...
/R/reed_thesis.R
no_license
Reedies/reedtemplates
R
false
false
5,156
r
#' Creates an R Markdown PDF Thesis document #' #' This is a function called in output in the YAML of the driver Rmd file to specify using the Reed #' Senior Thesis LaTeX template and cls files. #' #' @export #' @param toc A Boolean (TRUE or FALSE) specifying where table of contents should be created #' @param toc_dept...
# ----------------------------------------------- # Read FRED Data into PG DB # ----------------------------------------------- library(fredr) library(dplyr) library(RPostgreSQL) # read in beer sales and production from Federal Reserve of St Louis API (FRED) beer_sales <- fredr(endpoint="series/observations", series...
/data/FRED/FRED_beer_inventory_sales_pg_load.R
no_license
raybuhr/w210_beer_demand
R
false
false
1,564
r
# ----------------------------------------------- # Read FRED Data into PG DB # ----------------------------------------------- library(fredr) library(dplyr) library(RPostgreSQL) # read in beer sales and production from Federal Reserve of St Louis API (FRED) beer_sales <- fredr(endpoint="series/observations", series...
library(ProFound) ### Name: profoundGetEllipses ### Title: Calculate multiple annulus properties of iso-photal ellipses ### Aliases: profoundGetEllipses ### Keywords: ellipse ### ** Examples ## Not run: ##D # We need the ProFit library to show the profile: library(ProFit) ##D image = readFITS(system.file("extdata"...
/data/genthat_extracted_code/ProFound/examples/profoundGetEllipses.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,902
r
library(ProFound) ### Name: profoundGetEllipses ### Title: Calculate multiple annulus properties of iso-photal ellipses ### Aliases: profoundGetEllipses ### Keywords: ellipse ### ** Examples ## Not run: ##D # We need the ProFit library to show the profile: library(ProFit) ##D image = readFITS(system.file("extdata"...
if(require("testthat", quietly = TRUE)) { pkg <- "lme4" require(pkg, character.only=TRUE, quietly=TRUE) test_check(pkg) print(warnings()) # TODO? catch most of these by expect_warning(..) } else { cat( "package 'testthat' not available, cannot run unit tests\n" ) }
/tests/AAAtest-all.R
no_license
ego168/lme4
R
false
false
288
r
if(require("testthat", quietly = TRUE)) { pkg <- "lme4" require(pkg, character.only=TRUE, quietly=TRUE) test_check(pkg) print(warnings()) # TODO? catch most of these by expect_warning(..) } else { cat( "package 'testthat' not available, cannot run unit tests\n" ) }
#!/usr/bin/env Rscript # explore the relationships with max_fraction.... library(dplyr) library(tidyr) library(ggplot2) library(glue) library(viridis) args <- commandArgs(T) SAMPLE_INFO <- args[1] METRICS <- args[2] CHROM_COUNTS <- args[3] OUTLIER <- 'SRX859231' chrom_counts <- read.table(CHROM_COUNTS, head = F, as...
/public_survey/bin/max-fraction-figure-1.R
no_license
ParkerLab/ataqv-2019
R
false
false
8,835
r
#!/usr/bin/env Rscript # explore the relationships with max_fraction.... library(dplyr) library(tidyr) library(ggplot2) library(glue) library(viridis) args <- commandArgs(T) SAMPLE_INFO <- args[1] METRICS <- args[2] CHROM_COUNTS <- args[3] OUTLIER <- 'SRX859231' chrom_counts <- read.table(CHROM_COUNTS, head = F, as...
testlist <- list(A = structure(c(2.17107980817984e+205, 2.4417747255804e+298 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(multivariance:::match_rows,testlist) str(resul...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613121072-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
322
r
testlist <- list(A = structure(c(2.17107980817984e+205, 2.4417747255804e+298 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(multivariance:::match_rows,testlist) str(resul...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Dim.R \name{tiledb_dim} \alias{tiledb_dim} \title{Contructs a \code{tiledb_dim} object} \usage{ tiledb_dim( name, domain, tile, type, filter_list = tiledb_filter_list(), ctx = tiledb_get_context() ) } \arguments{ \item{name}{The d...
/man/tiledb_dim.Rd
permissive
TileDB-Inc/TileDB-R
R
false
true
1,055
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Dim.R \name{tiledb_dim} \alias{tiledb_dim} \title{Contructs a \code{tiledb_dim} object} \usage{ tiledb_dim( name, domain, tile, type, filter_list = tiledb_filter_list(), ctx = tiledb_get_context() ) } \arguments{ \item{name}{The d...
testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, ...
/metacoder/inst/testfiles/intersect_line_rectangle/AFL_intersect_line_rectangle/intersect_line_rectangle_valgrind_files/1615768830-test.R
permissive
akhikolla/updatedatatype-list3
R
false
false
729
r
testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, ...
sf = rchisq(1000,3,4) #blue nyc = rchisq(1000,5,5); #orange london = rchisq(1000,3,4); #green moscow = rchisq(1000,3,4); #red delhi = rchisq(1000,2,3); #purple manila = rchisq(1000,3,3); #brown do_cities = rbind(sf,nyc,london,moscow,delhi,manila); DD = list(); for (i in 1:6){ DD[[i]] = density(do_cities[i,],from=...
/2013-09-24/simulate_work_end_times.r
permissive
denisexifaras/decoded_presentation
R
false
false
986
r
sf = rchisq(1000,3,4) #blue nyc = rchisq(1000,5,5); #orange london = rchisq(1000,3,4); #green moscow = rchisq(1000,3,4); #red delhi = rchisq(1000,2,3); #purple manila = rchisq(1000,3,3); #brown do_cities = rbind(sf,nyc,london,moscow,delhi,manila); DD = list(); for (i in 1:6){ DD[[i]] = density(do_cities[i,],from=...
corr <- function(directory, threshold = 0) { ## reads directory of numbered csv files ## returns numeric vector of correlations between sulfate and nitrate that have complete cases ## above threshold number id<-1:332 v <- vector(mode="numeric") for(i in seq_along(id)){ file <- read.csv(p...
/corr.R
no_license
odwyert/Rfunctions
R
false
false
526
r
corr <- function(directory, threshold = 0) { ## reads directory of numbered csv files ## returns numeric vector of correlations between sulfate and nitrate that have complete cases ## above threshold number id<-1:332 v <- vector(mode="numeric") for(i in seq_along(id)){ file <- read.csv(p...
\name{results<-} \alias{results<-} \title{ Generic Function - results<- } \description{ Generic function } \usage{ results(object)<-value } \arguments{ \item{object}{ Depending on the class of \code{object} depends on the method used (and if one exists) } \item{value}{ Replacement value } } \details{ Generic F...
/man/results-.Rd
no_license
taylors2/PeriodCPT
R
false
false
714
rd
\name{results<-} \alias{results<-} \title{ Generic Function - results<- } \description{ Generic function } \usage{ results(object)<-value } \arguments{ \item{object}{ Depending on the class of \code{object} depends on the method used (and if one exists) } \item{value}{ Replacement value } } \details{ Generic F...
CPPevalHR<-function(time,sample){ ss<-nrow(sample$xi0) # sample size hr<-matrix(NA,ss,length(time)) if (ss>0) for(it in 1:ss){ # contribution in the origin hr[it,]<-sample$xi0[it,1]*sample$hyp$q*pnorm(time,sd=sample$hyp$sd,lower.tail=FALSE) # other contributions for(j in 1:s...
/BayHaz/R/CPPevalHR.R
no_license
ingted/R-Examples
R
false
false
506
r
CPPevalHR<-function(time,sample){ ss<-nrow(sample$xi0) # sample size hr<-matrix(NA,ss,length(time)) if (ss>0) for(it in 1:ss){ # contribution in the origin hr[it,]<-sample$xi0[it,1]*sample$hyp$q*pnorm(time,sd=sample$hyp$sd,lower.tail=FALSE) # other contributions for(j in 1:s...
# Practice Exercise 03 # # Start with the plot you created in Exercise 02. Again, here is the snippet # of code I provided in that exercise: # # ggplot( # data = economics, # mapping = aes( # x = date, # y = uempmed # ) # ) + # geom_line() # # In the original plot, the raw data are plotted as a line....
/docs/visualisation/practice_ggplot_03.R
no_license
djnavarro/robust-tools
R
false
false
1,039
r
# Practice Exercise 03 # # Start with the plot you created in Exercise 02. Again, here is the snippet # of code I provided in that exercise: # # ggplot( # data = economics, # mapping = aes( # x = date, # y = uempmed # ) # ) + # geom_line() # # In the original plot, the raw data are plotted as a line....
##First read in the arguments listed at the command line args=(commandArgs(TRUE)) ##args is now a list of character vectors ## First check to see if arguments are passed. ## Then cycle through each element of the list and evaluate the expressions. if(length(args)==0){ print("No arguments supplied.") ##supply defau...
/Rscripts/PCA.R
no_license
mbeccuti/4SeqGUI
R
false
false
618
r
##First read in the arguments listed at the command line args=(commandArgs(TRUE)) ##args is now a list of character vectors ## First check to see if arguments are passed. ## Then cycle through each element of the list and evaluate the expressions. if(length(args)==0){ print("No arguments supplied.") ##supply defau...
#' Output ggplot charts to pdf or png files #' @name bcg_palette #' @param pal Type of palette to pick, "ee" or "multi" or "traffic" or "bright" or "dark" - defaults to bright #' @import ggplot2 #' @export bcg_palette <- function(pal = "bright") { if(pal == "ee") { ret <- c( bcggtheme::bcg_green_b...
/R/bcg_palette.R
no_license
Tony-Chen-Melbourne/bcggtheme
R
false
false
1,672
r
#' Output ggplot charts to pdf or png files #' @name bcg_palette #' @param pal Type of palette to pick, "ee" or "multi" or "traffic" or "bright" or "dark" - defaults to bright #' @import ggplot2 #' @export bcg_palette <- function(pal = "bright") { if(pal == "ee") { ret <- c( bcggtheme::bcg_green_b...
setConstructorS3("SwapSequence3x3FeaturedElement",function() { swpSeq <- SwapSequence3x3() obj <- SwapSequenceFeaturedElement() obj$object <- swpSeq extend(obj,"SwapSequence3x3FeaturedElement") }) setMethodS3("getObjectTableName","SwapSequence3x3FeaturedElement", function(this, ...
/lib/Learning/SwapSequence/SwapSequence3x3FeaturedElement.R
no_license
pedabreu/OptimizationFramework
R
false
false
17,847
r
setConstructorS3("SwapSequence3x3FeaturedElement",function() { swpSeq <- SwapSequence3x3() obj <- SwapSequenceFeaturedElement() obj$object <- swpSeq extend(obj,"SwapSequence3x3FeaturedElement") }) setMethodS3("getObjectTableName","SwapSequence3x3FeaturedElement", function(this, ...
# BEMTOOL - Bio-Economic Model TOOLs - version 2.5 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the following e...
/BEMTOOL-ver2.5-2018_0901/bmtgui/economic_params/price/price_correction_fact/price_correction_fact.add_columns.r
no_license
gresci/BEMTOOL2.5
R
false
false
1,796
r
# BEMTOOL - Bio-Economic Model TOOLs - version 2.5 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the following e...
## ----download, eval=FALSE------------------------------------------------ # chooseCRANmirror(ind=1) # install.packages("BrailleR") ## ----update, eval=FALSE-------------------------------------------------- # chooseCRANmirror(ind=1) # update.packages(ask=FALSE) ## ----start, eval=FALSE------------------...
/data/genthat_extracted_code/BrailleR/vignettes/GettingStarted.R
no_license
surayaaramli/typeRrh
R
false
false
492
r
## ----download, eval=FALSE------------------------------------------------ # chooseCRANmirror(ind=1) # install.packages("BrailleR") ## ----update, eval=FALSE-------------------------------------------------- # chooseCRANmirror(ind=1) # update.packages(ask=FALSE) ## ----start, eval=FALSE------------------...
require(readr) require(plyr) require(igraph) require(rgexf) # set working directory getwd() setwd("../query_results/merge_scripts/complete_merge/") # read node and edges into dataframe with the name expected by igraph nodes <- read.csv("time_slice_1499_complete_merge_budé_and_era_correspondents.csv", fileEncoding="UT...
/intersections_budé_erasmus/r_scripts/complete_merge_time_slices_gexf_created_by_r/create_gexf_complete_merge_budé_era_1499.R
no_license
CKudella/corr_data
R
false
false
4,291
r
require(readr) require(plyr) require(igraph) require(rgexf) # set working directory getwd() setwd("../query_results/merge_scripts/complete_merge/") # read node and edges into dataframe with the name expected by igraph nodes <- read.csv("time_slice_1499_complete_merge_budé_and_era_correspondents.csv", fileEncoding="UT...
library(coin) ### Name: PermutationDistribution-methods ### Title: Computation of the Permutation Distribution ### Aliases: dperm dperm-methods dperm,IndependenceTest-method ### dperm,NullDistribution-method pperm pperm-methods ### pperm,IndependenceTest-method pperm,NullDistribution-method qperm ### qperm-meth...
/data/genthat_extracted_code/coin/examples/PermutationDistribution-methods.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,186
r
library(coin) ### Name: PermutationDistribution-methods ### Title: Computation of the Permutation Distribution ### Aliases: dperm dperm-methods dperm,IndependenceTest-method ### dperm,NullDistribution-method pperm pperm-methods ### pperm,IndependenceTest-method pperm,NullDistribution-method qperm ### qperm-meth...
#' @templateVar class kde #' @template title_desc_tidy #' #' @param x A `kde` object returned from [ks::kde()]. #' @template param_unused_dots #' #' @evalRd return_tidy("obs", "variable", "value", "estimate") #' #' @details Returns a data frame in long format with four columns. Use #' \code{tidyr::pivot_wider(..., na...
/R/ks-tidiers.R
permissive
tidymodels/broom
R
false
false
1,782
r
#' @templateVar class kde #' @template title_desc_tidy #' #' @param x A `kde` object returned from [ks::kde()]. #' @template param_unused_dots #' #' @evalRd return_tidy("obs", "variable", "value", "estimate") #' #' @details Returns a data frame in long format with four columns. Use #' \code{tidyr::pivot_wider(..., na...
############### ## Ejemplo 1 ## ############### # Cargando la libreria library(FactoMineR) # cargando el conjunto de datos naranja <- read.table("http://factominer.free.fr/libra/naranja.csv",header=TRUE, sep=";", dec=".", row.names=1) naranja # Correlaciones entre las variables cor(naranja[,1:7]) # Componentes princip...
/2019-2/tecnicas-multivariadas/clase-8/CodigosR_clase1.R
no_license
jamanrique/maestria-pucp
R
false
false
5,008
r
############### ## Ejemplo 1 ## ############### # Cargando la libreria library(FactoMineR) # cargando el conjunto de datos naranja <- read.table("http://factominer.free.fr/libra/naranja.csv",header=TRUE, sep=";", dec=".", row.names=1) naranja # Correlaciones entre las variables cor(naranja[,1:7]) # Componentes princip...
#AT FIRST : USE load-data.R file #list of our datasets we want to estimate donn_list = list(donn40, donn100, donn500, donn1000); #error matrix error_train <- matrix(0, length(donn_list), 20); error_test <- matrix(0, length(donn_list), 20); #start of algorithm for (i in 1:length(donn_list)) { data <- as.data.fra...
/Synth_errorRate.R
permissive
BlancNicolas/SY09TP4
R
false
false
2,178
r
#AT FIRST : USE load-data.R file #list of our datasets we want to estimate donn_list = list(donn40, donn100, donn500, donn1000); #error matrix error_train <- matrix(0, length(donn_list), 20); error_test <- matrix(0, length(donn_list), 20); #start of algorithm for (i in 1:length(donn_list)) { data <- as.data.fra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sqs_operations.R \name{sqs_change_message_visibility_batch} \alias{sqs_change_message_visibility_batch} \title{Changes the visibility timeout of multiple messages} \usage{ sqs_change_message_visibility_batch(QueueUrl, Entries) } \arguments{ \...
/cran/paws.application.integration/man/sqs_change_message_visibility_batch.Rd
permissive
paws-r/paws
R
false
true
1,122
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sqs_operations.R \name{sqs_change_message_visibility_batch} \alias{sqs_change_message_visibility_batch} \title{Changes the visibility timeout of multiple messages} \usage{ sqs_change_message_visibility_batch(QueueUrl, Entries) } \arguments{ \...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-Pop.R \name{resetPop} \alias{resetPop} \title{Reset population} \usage{ resetPop(pop, simParam = NULL) } \arguments{ \item{pop}{an object of \code{\link{Pop-class}}} \item{simParam}{an object of \code{\link{SimParam}}} } \...
/man/resetPop.Rd
no_license
cran/AlphaSimR
R
false
true
792
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-Pop.R \name{resetPop} \alias{resetPop} \title{Reset population} \usage{ resetPop(pop, simParam = NULL) } \arguments{ \item{pop}{an object of \code{\link{Pop-class}}} \item{simParam}{an object of \code{\link{SimParam}}} } \...
suppressPackageStartupMessages(library(mcmc)) suppressPackageStartupMessages(library(coda)) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(ggplot2)) suppressPackageStartupMessages(library(magrittr)) suppressPackageStartupMessages(library(reshape2)) suppressPackageStartupMessages(l...
/examples/ape-simulation-2/src/post-mcmc-visualisation.R
permissive
aezarebski/timtam
R
false
false
14,447
r
suppressPackageStartupMessages(library(mcmc)) suppressPackageStartupMessages(library(coda)) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(ggplot2)) suppressPackageStartupMessages(library(magrittr)) suppressPackageStartupMessages(library(reshape2)) suppressPackageStartupMessages(l...
#########Take MLL dataset as an example ACC <- c();Kappa <- c();acc <- c();ka <- c(); rLfeage <- refram[[8]];q <- ytrain2[,rLfeage];acc <- c();ka <- c(); ########refram is feature gene sets classtrain <- as.character(Lytraclass)####Lytraclass is from "82Split.R" folda <- createFolds(classtrain,k=10);i <- 1...
/Multi-class/GenSVM on training set of Multi-class dataset.R
no_license
MohammedQaraad/rL-GenSVM
R
false
false
1,319
r
#########Take MLL dataset as an example ACC <- c();Kappa <- c();acc <- c();ka <- c(); rLfeage <- refram[[8]];q <- ytrain2[,rLfeage];acc <- c();ka <- c(); ########refram is feature gene sets classtrain <- as.character(Lytraclass)####Lytraclass is from "82Split.R" folda <- createFolds(classtrain,k=10);i <- 1...
# Check to see, if required packages are installed. In case packages are not # available on the system, install them. if (!"dplyr" %in% installed.packages()) { warning("Package dplyr required for this script. Installing dplyr now.") install.packages("dplyr") } # Load package library(dplyr) # Download data file ...
/run_analysis.R
no_license
anupkumarsahu/getting-and-cleaning-data-course-project
R
false
false
2,871
r
# Check to see, if required packages are installed. In case packages are not # available on the system, install them. if (!"dplyr" %in% installed.packages()) { warning("Package dplyr required for this script. Installing dplyr now.") install.packages("dplyr") } # Load package library(dplyr) # Download data file ...
## Loading data fom the URL temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",temp) unzip(temp,exdir=tempdir()) unlink(temp) curDir<-getwd() # save location of the working directory the script was launched from setwd(tempdir()) ## read data se...
/run_analysis.R
no_license
Rajithat/Cleaning-Data
R
false
false
1,902
r
## Loading data fom the URL temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",temp) unzip(temp,exdir=tempdir()) unlink(temp) curDir<-getwd() # save location of the working directory the script was launched from setwd(tempdir()) ## read data se...
testlist <- list(x = structure(c(2.11370674490681e-314, 1.38921840109703e-309, 156842163063.465, 2.4178493308706e+24, 1.39067083012045e-309, 5.42285971362926e-312, 2.53949741962401e-321, 3.58687506709058e+304, 8.15934685021785e-315, 4.26468714945291e-314, 1.59939745437759e-314, 1.60188047707408e-306, 3.565981192438...
/multivariance/inst/testfiles/doubleCenterBiasCorrectedUpper/libFuzzer_doubleCenterBiasCorrectedUpper/doubleCenterBiasCorrectedUpper_valgrind_files/1612884480-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
616
r
testlist <- list(x = structure(c(2.11370674490681e-314, 1.38921840109703e-309, 156842163063.465, 2.4178493308706e+24, 1.39067083012045e-309, 5.42285971362926e-312, 2.53949741962401e-321, 3.58687506709058e+304, 8.15934685021785e-315, 4.26468714945291e-314, 1.59939745437759e-314, 1.60188047707408e-306, 3.565981192438...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rearrr_fn_docs.R \name{rearrr_fn_} \alias{rearrr_fn_} \title{Parent function for documentation inheritance} \usage{ rearrr_fn_(data, origin_fn, check_fn, allowed_types, force_df, min_dims) } \arguments{ \item{data}{\code{data.frame} or \code{...
/man/rearrr_fn_.Rd
permissive
LudvigOlsen/rearrr
R
false
true
1,700
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rearrr_fn_docs.R \name{rearrr_fn_} \alias{rearrr_fn_} \title{Parent function for documentation inheritance} \usage{ rearrr_fn_(data, origin_fn, check_fn, allowed_types, force_df, min_dims) } \arguments{ \item{data}{\code{data.frame} or \code{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cross_validation_functions.R \name{balanced.folds} \alias{balanced.folds} \title{Create balanced folds for cross-validation.} \usage{ balanced.folds(y, nfolds = min(min(table(y)), 10)) } \arguments{ \item{y}{the response vector} \item{nfolds...
/man/balanced.folds.Rd
no_license
xhuang4/optaucx
R
false
true
449
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cross_validation_functions.R \name{balanced.folds} \alias{balanced.folds} \title{Create balanced folds for cross-validation.} \usage{ balanced.folds(y, nfolds = min(min(table(y)), 10)) } \arguments{ \item{y}{the response vector} \item{nfolds...
#1 Load the cell segmentation data from the AppliedPredictiveModeling package using the commands: library(AppliedPredictiveModeling) data(segmentationOriginal) library(caret) #1. Subset the data to a training set and testing set based on the Case variable in the data set. train<-segmentationOriginal[segmentation...
/practical_machine_learning_quiz3.R
no_license
daverunfast/Practical_Machine_Learning
R
false
false
4,617
r
#1 Load the cell segmentation data from the AppliedPredictiveModeling package using the commands: library(AppliedPredictiveModeling) data(segmentationOriginal) library(caret) #1. Subset the data to a training set and testing set based on the Case variable in the data set. train<-segmentationOriginal[segmentation...
library(shiny) S <- 20 #total number of applicants to a summer school C <- 50 #total number of calls to hotline ######### applicants level ######### applicantID <- 1:S ### binomial set.seed(698) admitted.to.summerschool <- rbinom(S, size=1, 0.6) ### poisson set.seed(48) #get 50 calls times.contacted.hotline <- rp...
/global.R
no_license
alionaBER/MLE
R
false
false
1,247
r
library(shiny) S <- 20 #total number of applicants to a summer school C <- 50 #total number of calls to hotline ######### applicants level ######### applicantID <- 1:S ### binomial set.seed(698) admitted.to.summerschool <- rbinom(S, size=1, 0.6) ### poisson set.seed(48) #get 50 calls times.contacted.hotline <- rp...
# con = url("https://scholar.google.com/citations?user=HI-I6C0AAAAJ&hl=en") htmlCode = readLines(con) close(con) htmlCode # parsing with xml package install.packages("XML") library(XML) url <- "https://scholar.google.com/citations?user=HI-I6C0AAAAJ&hl=en" html <- htmlTreeParse(url, useInternalNodes = T) xpathSApply...
/coursera-data-sci/02_GettingAndCleaningData/02_03_reading_from_web.R
no_license
dsk1/coursera-data-sci
R
false
false
755
r
# con = url("https://scholar.google.com/citations?user=HI-I6C0AAAAJ&hl=en") htmlCode = readLines(con) close(con) htmlCode # parsing with xml package install.packages("XML") library(XML) url <- "https://scholar.google.com/citations?user=HI-I6C0AAAAJ&hl=en" html <- htmlTreeParse(url, useInternalNodes = T) xpathSApply...
library(psych) library(dplyr) library(ggplot2) library(GGally) d <- cars glimpse(d) summary(d) tail(d, 10) d2 <- mutate(d, speed = 1.67*speed, dist = 0.3*dist, ratio = dist/speed) d2 qplot(data=d2, dist) fit <- lm(dist ~ speed, d2) fit beta_hat <- coef(fit) eps_hat <- residuals(fit) eps_hat y_hat <- fitted(fit) y_...
/6. Econometrics/6.1. Week 1.R
no_license
sergeymong/R
R
false
false
1,020
r
library(psych) library(dplyr) library(ggplot2) library(GGally) d <- cars glimpse(d) summary(d) tail(d, 10) d2 <- mutate(d, speed = 1.67*speed, dist = 0.3*dist, ratio = dist/speed) d2 qplot(data=d2, dist) fit <- lm(dist ~ speed, d2) fit beta_hat <- coef(fit) eps_hat <- residuals(fit) eps_hat y_hat <- fitted(fit) y_...
######################################################################### # # CHAPTER 5, Hip Replacement Study # # Fitting population-averaged models uing the gls() function in nlme # # See the program for the dental study program for details. # # As discussed in the not...
/course/st790/examples/hips_pa.R
no_license
BowenNCSU/BowenNCSU.github.io
R
false
false
13,229
r
######################################################################### # # CHAPTER 5, Hip Replacement Study # # Fitting population-averaged models uing the gls() function in nlme # # See the program for the dental study program for details. # # As discussed in the not...
library(tm) library(SnowballC) tab = read.csv("../data/emails.csv") ids = data.frame(Id=1:nrow(tab)) ids_kept = 1:nrow(tab) date = as.Date(tab$DateSent) tab = tab[!is.na(date),] ids_kept = ids_kept[!is.na(date)] date = date[!is.na(date)] vect = VectorSource(tab$AllText) corpus = Corpus(vect) corpus = tm_map(corpus,...
/code/dtm.R
permissive
rogerfan/601_Final_Project
R
false
false
1,084
r
library(tm) library(SnowballC) tab = read.csv("../data/emails.csv") ids = data.frame(Id=1:nrow(tab)) ids_kept = 1:nrow(tab) date = as.Date(tab$DateSent) tab = tab[!is.na(date),] ids_kept = ids_kept[!is.na(date)] date = date[!is.na(date)] vect = VectorSource(tab$AllText) corpus = Corpus(vect) corpus = tm_map(corpus,...
# Matrizes, Operações com Matrizes e Matrizes Nomeados # Obs: Caso tenha problemas com a acentuação, consulte este link: # https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding # Configurando o diretório de trabalho # Coloque entre aspas o diretório de trabalho que você está usando no seu comput...
/fundamento_linguagem_R/07-Matrizes.R
no_license
Orindiuva/AnalyticsR
R
false
false
2,079
r
# Matrizes, Operações com Matrizes e Matrizes Nomeados # Obs: Caso tenha problemas com a acentuação, consulte este link: # https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding # Configurando o diretório de trabalho # Coloque entre aspas o diretório de trabalho que você está usando no seu comput...
\name{BayesNMF.MutationalSignatures} \alias{BayesNMF.MutationalSignatures} \title{Perform Bayesian NMF mutational signature analysis} \description{ Perform Bayesian NMF mutational signature analysis. Source code borrowed from Broad Institute CGA. } \usage{ BayesNMF.MutationalSignatures(x, tumor.type="tumor.type", hyper...
/man/BayesNMF.MutationalSignatures.Rd
no_license
tienan/lxctk-m1
R
false
false
1,300
rd
\name{BayesNMF.MutationalSignatures} \alias{BayesNMF.MutationalSignatures} \title{Perform Bayesian NMF mutational signature analysis} \description{ Perform Bayesian NMF mutational signature analysis. Source code borrowed from Broad Institute CGA. } \usage{ BayesNMF.MutationalSignatures(x, tumor.type="tumor.type", hyper...
#' Filter Multiple Primer Sets. #' #' Filters multiple primer sets at once. #' #' @param primers List with primer data frames. #' @param templates List with template data frames. #' @param active.constraints Strings giving the constraints that are to be checked. #' @param settings List with settings. #' @param updateP...
/R/filters.R
no_license
weixinsuoxian/openPrimeR
R
false
false
52,006
r
#' Filter Multiple Primer Sets. #' #' Filters multiple primer sets at once. #' #' @param primers List with primer data frames. #' @param templates List with template data frames. #' @param active.constraints Strings giving the constraints that are to be checked. #' @param settings List with settings. #' @param updateP...
##-------------------------------preprocessing------------------------- library(lattice) library(ggplot2) library(caret) library(kernlab) data(spam) inTrain <- createDataPartition(y = spam$type, p = 0.75, list = FALSE) ## p is the percent of training set training <- spam[inTrain, ] testing <- spam[-inTrain, ] hist(tra...
/08-PracticalMachineLearning/preprocessing.R
no_license
MoonJeounghoon/Data-Science-Specialization
R
false
false
1,984
r
##-------------------------------preprocessing------------------------- library(lattice) library(ggplot2) library(caret) library(kernlab) data(spam) inTrain <- createDataPartition(y = spam$type, p = 0.75, list = FALSE) ## p is the percent of training set training <- spam[inTrain, ] testing <- spam[-inTrain, ] hist(tra...
`hodogram` <- function(nbaz, dt=dt, labs=c("Vertical", "North", "East"), COL=rainbow(140)[1:100] , STAMP="") { if(missing(labs)) { labs=c("Vertical", "North", "East") } if(missing(COL)) { COL=rainbow(140)[1:100] } if(missing(dt)) { dt=1 } if(missing(STAMP)) { STAMP="" } ###### par...
/R/hodogram.R
no_license
cran/RSEIS
R
false
false
3,859
r
`hodogram` <- function(nbaz, dt=dt, labs=c("Vertical", "North", "East"), COL=rainbow(140)[1:100] , STAMP="") { if(missing(labs)) { labs=c("Vertical", "North", "East") } if(missing(COL)) { COL=rainbow(140)[1:100] } if(missing(dt)) { dt=1 } if(missing(STAMP)) { STAMP="" } ###### par...
## makeCacheMatrix creates a list containing a function to # 1 - set the entries of the matrix # 2 - get the entries of the matrix # 3 - set the values of the matrix inverse # 4 - set the values of the matrix inverse makeCacheMatrix <- function(x = matrix()) { im <- NULL set <- function(y) { ...
/cachematrix.R
no_license
manna88aero/ProgrammingAssignment2
R
false
false
1,315
r
## makeCacheMatrix creates a list containing a function to # 1 - set the entries of the matrix # 2 - get the entries of the matrix # 3 - set the values of the matrix inverse # 4 - set the values of the matrix inverse makeCacheMatrix <- function(x = matrix()) { im <- NULL set <- function(y) { ...
#Introduction to R #Introduction to R # Read the data Data <- read.table(file="C:/Users/singh/Desktop/midterm/Part2/historical_data1_Q12005.txt", header=FALSE, sep="|") test<-read.table(file = "C:/Users/singh/Desktop/midterm/Part2/historical_data1_Q22005.txt", header=FALSE, sep="|") origclass <- c('numeric','...
/Prediction.R
no_license
max030/Freddiemac-Single-Family-Loan-Level-Dataset
R
false
false
9,574
r
#Introduction to R #Introduction to R # Read the data Data <- read.table(file="C:/Users/singh/Desktop/midterm/Part2/historical_data1_Q12005.txt", header=FALSE, sep="|") test<-read.table(file = "C:/Users/singh/Desktop/midterm/Part2/historical_data1_Q22005.txt", header=FALSE, sep="|") origclass <- c('numeric','...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makeCacheMatrix takes a matrix as an input and creates a ## special "matrix" with the input. ## It caches the input matrix, its inverse , ## and a caching flag indicating if inver...
/cachematrix.R
no_license
sarmisthad/ProgrammingAssignment2
R
false
false
2,237
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makeCacheMatrix takes a matrix as an input and creates a ## special "matrix" with the input. ## It caches the input matrix, its inverse , ## and a caching flag indicating if inver...
output$goalSummary <- DT::renderDataTable({ df <- unique(allGoalsPlayer[allGoalsPlayer$PLAYERID == input$playerA,]) %>% ungroup() %>% select(-PLAYERID) # #print("df length") # #print(nrow(df)) # #print(glimpse(df)) #does have 1 obs all0 so should show up if (nrow(df) > 1) { career ...
/code/goalSummary.R
no_license
alphadiop/premierLeague
R
false
false
1,169
r
output$goalSummary <- DT::renderDataTable({ df <- unique(allGoalsPlayer[allGoalsPlayer$PLAYERID == input$playerA,]) %>% ungroup() %>% select(-PLAYERID) # #print("df length") # #print(nrow(df)) # #print(glimpse(df)) #does have 1 obs all0 so should show up if (nrow(df) > 1) { career ...
x <- 10 x + 1 #but i like comments #Can I add another comment?
/QATestRepo/scriptTest1.R
no_license
dfalty/QATestRepo
R
false
false
67
r
x <- 10 x + 1 #but i like comments #Can I add another comment?
context("plotCorrelationHeatmap") load(system.file( file.path("extdata", "bcb.rda"), package = "bcbioRNASeq")) test_that("plotCorrelationHeatmap", { # Pearson (default) p <- plotCorrelationHeatmap(bcb) expect_equal( names(p), c("tree_row", "tree_col", "kmeans", "gtable") ) ...
/tests/testthat/test_plotCorrelationHeatmap.R
permissive
lpantano/bcbioRNASeq
R
false
false
629
r
context("plotCorrelationHeatmap") load(system.file( file.path("extdata", "bcb.rda"), package = "bcbioRNASeq")) test_that("plotCorrelationHeatmap", { # Pearson (default) p <- plotCorrelationHeatmap(bcb) expect_equal( names(p), c("tree_row", "tree_col", "kmeans", "gtable") ) ...
# Author: Komal S. Rathi # Function: driver script to call all functions and generate output for mutation only analysis # set directories root_dir <- rprojroot::find_root(rprojroot::has_dir(".git")) data_dir <- file.path(root_dir, "data") code_dir <- file.path(root_dir, "code") utils_dir <- file.path(code_dir, "utils"...
/code/driver_mut_only.R
no_license
d3b-center/OMPARE
R
false
false
7,768
r
# Author: Komal S. Rathi # Function: driver script to call all functions and generate output for mutation only analysis # set directories root_dir <- rprojroot::find_root(rprojroot::has_dir(".git")) data_dir <- file.path(root_dir, "data") code_dir <- file.path(root_dir, "code") utils_dir <- file.path(code_dir, "utils"...
\name{capscale} \alias{capscale} \alias{dbrda} \title{[Partial] Distance-based Redundancy Analysis } \description{ Distance-based redundancy analysis (dbRDA) is an ordination method similar to Redundancy Analysis (\code{\link{rda}}), but it allows non-Euclidean dissimilarity indices, such as Manhattan or Bray-...
/man/capscale.Rd
no_license
nemochina2008/vegan
R
false
false
11,449
rd
\name{capscale} \alias{capscale} \alias{dbrda} \title{[Partial] Distance-based Redundancy Analysis } \description{ Distance-based redundancy analysis (dbRDA) is an ordination method similar to Redundancy Analysis (\code{\link{rda}}), but it allows non-Euclidean dissimilarity indices, such as Manhattan or Bray-...
#########XGBoost和随机特征子集选择学习法######################### ### 载入数据包 library('readr') library('magrittr') library('Matrix') library('xgboost') ### 载入数据 dt.train <- readr::read_csv('train_1.csv', col_types = paste(rep('d', 371), collapse = '')) dt.train <- readr::read_csv('test_1.csv', ...
/Santander用户满意度预测.R
no_license
Joshinstatic/RApplication
R
false
false
2,747
r
#########XGBoost和随机特征子集选择学习法######################### ### 载入数据包 library('readr') library('magrittr') library('Matrix') library('xgboost') ### 载入数据 dt.train <- readr::read_csv('train_1.csv', col_types = paste(rep('d', 371), collapse = '')) dt.train <- readr::read_csv('test_1.csv', ...
function(input, output, session) { terms <- reactive({ input$update isolate({ withProgress({ setProgress(message = "Processing ...") getTermMatrix(input$selection) }) }) }) wordcloud_rep <- repeatable(wordcloud) output$plot <- renderPlot({ v <- terms() ...
/DevelopingDataProducts_project/server.R
no_license
pellurubala/datasciencecoursera
R
false
false
481
r
function(input, output, session) { terms <- reactive({ input$update isolate({ withProgress({ setProgress(message = "Processing ...") getTermMatrix(input$selection) }) }) }) wordcloud_rep <- repeatable(wordcloud) output$plot <- renderPlot({ v <- terms() ...
bhl_16s_noS14_merge <- merge_samples(bhl_16s_noS14,“LandManagemant”) sample_data(bhl_16s_noS14_merge)$LandManagemant <- levels(sample_data(bhl_16s_noS14)$LandManagemant) bhl_16s_noS14_merge_re = transform_sample_counts(bhl_16s_noS14_merge, function(x) 100 * x/sum(x)) bhl_16s_noS14_merge_re_g = tax_glom(bhl_16s_noS14_me...
/Rscripts/phyloseq_bar_chart.R
no_license
metajinomics/dev
R
false
false
654
r
bhl_16s_noS14_merge <- merge_samples(bhl_16s_noS14,“LandManagemant”) sample_data(bhl_16s_noS14_merge)$LandManagemant <- levels(sample_data(bhl_16s_noS14)$LandManagemant) bhl_16s_noS14_merge_re = transform_sample_counts(bhl_16s_noS14_merge, function(x) 100 * x/sum(x)) bhl_16s_noS14_merge_re_g = tax_glom(bhl_16s_noS14_me...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/emuR-dataDocs.R \docType{data} \name{coutts.l} \alias{coutts.l} \title{Vector of word label from the segment list coutts} \format{segmentlist} \description{ An EMU dataset } \keyword{datasets}
/man/coutts.l.Rd
no_license
fsuettmann/emuR
R
false
true
271
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/emuR-dataDocs.R \docType{data} \name{coutts.l} \alias{coutts.l} \title{Vector of word label from the segment list coutts} \format{segmentlist} \description{ An EMU dataset } \keyword{datasets}
#' run_hindcast_optim #' @description A wrapper of the optim function to be used for hindcast optimization #' @param PAR.START initial parameter in optim #' @param FUN fn function in optim #' @param ... Pass through varibles to be used in FUN #' @param LOWER Lower bound of parameter #' @param UPPER Uppler bound of par...
/R/run_hindcast_optim.R
no_license
realxinzhao/tradecast
R
false
false
2,044
r
#' run_hindcast_optim #' @description A wrapper of the optim function to be used for hindcast optimization #' @param PAR.START initial parameter in optim #' @param FUN fn function in optim #' @param ... Pass through varibles to be used in FUN #' @param LOWER Lower bound of parameter #' @param UPPER Uppler bound of par...
#' @param file (deprecated) use \code{object} argument instead.
/man-roxygen/deprecated_file_object_param.R
no_license
choi-phd/TestDesign
R
false
false
64
r
#' @param file (deprecated) use \code{object} argument instead.
#' @title Numeric and Categoric statistic plots #' #' @description Plot box plot and histogram for numeric variables & Pie chart and Barplot for categorical variables #' #' @param data columnn (user can give this parameter as it is) exportfileto #' #' @return NULL #' #' @examples Statplot_all_numerics_cum_ca...
/R/Statplot_all_numerics_cum_categorical.R
no_license
Venkat198711/EDAext
R
false
false
2,383
r
#' @title Numeric and Categoric statistic plots #' #' @description Plot box plot and histogram for numeric variables & Pie chart and Barplot for categorical variables #' #' @param data columnn (user can give this parameter as it is) exportfileto #' #' @return NULL #' #' @examples Statplot_all_numerics_cum_ca...
plot_forecast <- function(pdf_file_name, output_file, catwalk_fname, include_wq, forecast_days, code_folder, save_location, data_location,...
/Rscripts/visualization_analysis/plot_forecast.R
permissive
jzwart/FLARE
R
false
false
37,465
r
plot_forecast <- function(pdf_file_name, output_file, catwalk_fname, include_wq, forecast_days, code_folder, save_location, data_location,...
library(targets) library(tarchetypes) library(future) # Targets setup ----------------------------------------------------------- options(czso.dest_dir = "data-input/czso") # Set target-specific options such as packages. tar_option_set(packages = c("dplyr", "tidyr", "stringr", "lubridate", ...
/_targets.R
no_license
petrbouchal/ucimeonline
R
false
false
11,497
r
library(targets) library(tarchetypes) library(future) # Targets setup ----------------------------------------------------------- options(czso.dest_dir = "data-input/czso") # Set target-specific options such as packages. tar_option_set(packages = c("dplyr", "tidyr", "stringr", "lubridate", ...
dmixing=function (x, sevdist, log = FALSE){ cmu=sevdist$par[[3]][[5]][1] ctau=sevdist$par[[3]][[5]][2] rx <- function(x, cmu, ctau) { (sevdist$par[[1]][[1]](x) - sevdist$par[[2]][[1]](x)) * atan((x - cmu)/ctau) } d = x r = try(pracma::quadinf(function(x){rx(x, cmu=cmu, ctau = ctau)}, xa = 0...
/R/dpqrmixing.R
no_license
cran/OpVaR
R
false
false
1,930
r
dmixing=function (x, sevdist, log = FALSE){ cmu=sevdist$par[[3]][[5]][1] ctau=sevdist$par[[3]][[5]][2] rx <- function(x, cmu, ctau) { (sevdist$par[[1]][[1]](x) - sevdist$par[[2]][[1]](x)) * atan((x - cmu)/ctau) } d = x r = try(pracma::quadinf(function(x){rx(x, cmu=cmu, ctau = ctau)}, xa = 0...
classification <- readRDS("./exdata-data-NEI_data/Source_Classification_Code.rds") summarySCC <- readRDS("./exdata-data-NEI_data/summarySCC_PM25.rds") library(ggplot2); library(dplyr) group_type <- summarySCC %>% tbl_df() %>% filter(fips=="24510") %>% mutate(type = as.factor(type)) %>% ...
/Exploratory Data Analysis/plot3.R
no_license
gyz0807/JHU-Data-Science
R
false
false
657
r
classification <- readRDS("./exdata-data-NEI_data/Source_Classification_Code.rds") summarySCC <- readRDS("./exdata-data-NEI_data/summarySCC_PM25.rds") library(ggplot2); library(dplyr) group_type <- summarySCC %>% tbl_df() %>% filter(fips=="24510") %>% mutate(type = as.factor(type)) %>% ...
\name{oposSOM-package} \alias{oposSOM-package} \alias{oposSOM} \docType{package} \title{ Comprehensive analysis of transciptome data } \description{ This package translates microarray expression data into metadata of reduced dimension. It provides various sample-centered and group-centered visualizations, sample simila...
/man/oposSOM-package.Rd
no_license
MariaNikoghosyan/oposSOM
R
false
false
2,603
rd
\name{oposSOM-package} \alias{oposSOM-package} \alias{oposSOM} \docType{package} \title{ Comprehensive analysis of transciptome data } \description{ This package translates microarray expression data into metadata of reduced dimension. It provides various sample-centered and group-centered visualizations, sample simila...
## Dale W.R. Rosenthal, 2018 ## You are free to distribute and use this code so long as you attribute ## it to me or cite the text. ## The legal disclaimer in _A Quantitative Primer on Investments with R_ ## applies to this code. Use or distribution without these comment lines ## is forbidden. pca.usd <- prcomp(~ T...
/rain/hw3/ch12-exercises.r
no_license
chicago-joe/RScripts
R
false
false
516
r
## Dale W.R. Rosenthal, 2018 ## You are free to distribute and use this code so long as you attribute ## it to me or cite the text. ## The legal disclaimer in _A Quantitative Primer on Investments with R_ ## applies to this code. Use or distribution without these comment lines ## is forbidden. pca.usd <- prcomp(~ T...
library(plyr) library(dplyr) library(quantmod) library(lubridate) library(sqldf) # # Execute extractData.R to download needed file # dir<-"C:/Courses/JohnHopkins/ExploratoryDataAnalysis/Week1/project" if (!file.exists(dir)){ stop(paste("Folder",dir,"not accessible. Job aborted")) } setwd(dir) pwr...
/Project01/plot1.R
no_license
RamajiG/ExData_Plotting1
R
false
false
1,100
r
library(plyr) library(dplyr) library(quantmod) library(lubridate) library(sqldf) # # Execute extractData.R to download needed file # dir<-"C:/Courses/JohnHopkins/ExploratoryDataAnalysis/Week1/project" if (!file.exists(dir)){ stop(paste("Folder",dir,"not accessible. Job aborted")) } setwd(dir) pwr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ucompROC.R \name{ucompROC} \alias{ucompROC} \title{Hypothesis test for comparing AUCs of two correlated ROC curves using unbiased variance estimator} \usage{ ucompROC(ROC1,ROC2,alternative=c("two.sided","less","greater"), var_diff=FALSE,ci=FA...
/man/ucompROC.Rd
no_license
luyut99/uROC
R
false
true
3,345
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ucompROC.R \name{ucompROC} \alias{ucompROC} \title{Hypothesis test for comparing AUCs of two correlated ROC curves using unbiased variance estimator} \usage{ ucompROC(ROC1,ROC2,alternative=c("two.sided","less","greater"), var_diff=FALSE,ci=FA...
\name{cvr.glmnet} \alias{cvr.glmnet} \title{Repeating cv.glmnet} \usage{ cvr.glmnet(X, Y, family, standardize=TRUE,alpha=1, nfolds, ncv, type.measure,...) } \arguments{ \item{X}{a (nxp) matrix of predictors with observations in rows and predictors in columns} \item{Y}{n-vector giving the value of the response...
/man/cvr.glmnet.Rd
no_license
cran/ipflasso
R
false
false
2,784
rd
\name{cvr.glmnet} \alias{cvr.glmnet} \title{Repeating cv.glmnet} \usage{ cvr.glmnet(X, Y, family, standardize=TRUE,alpha=1, nfolds, ncv, type.measure,...) } \arguments{ \item{X}{a (nxp) matrix of predictors with observations in rows and predictors in columns} \item{Y}{n-vector giving the value of the response...
set.seed(1234) par(mar=c(0,0,0,0)) x <-rnorm(n=12,mean=rep(1:3,each=4),sd=0.2) y <-rnorm(n=12,mean=rep(c(1,2,1),each=4),sd=0.2) plot(x,y,col="blue",pch=20,cex=2) text(x+0.05,y+0.05,labels = as.character(1:12)) dataframe <- data.frame(x,y) distxy <- dist(dataframe) clustering <- hclust(distxy) plot(clustering) datamat...
/Clustering.R
no_license
shaiksha1290/R_Practise
R
false
false
368
r
set.seed(1234) par(mar=c(0,0,0,0)) x <-rnorm(n=12,mean=rep(1:3,each=4),sd=0.2) y <-rnorm(n=12,mean=rep(c(1,2,1),each=4),sd=0.2) plot(x,y,col="blue",pch=20,cex=2) text(x+0.05,y+0.05,labels = as.character(1:12)) dataframe <- data.frame(x,y) distxy <- dist(dataframe) clustering <- hclust(distxy) plot(clustering) datamat...
#' Take fractionary part and make its binary expansion #' Auxiliary function used in expanding real numbers #' @param x is a number between 0 and 1 #' @return Binary expansion of length 31 of the decimal input #' @note this implementation uses the built-in function intToBits fracbinary<-function(x){ ##Using integ...
/R/fracbinary.R
no_license
cran/XICOR
R
false
false
489
r
#' Take fractionary part and make its binary expansion #' Auxiliary function used in expanding real numbers #' @param x is a number between 0 and 1 #' @return Binary expansion of length 31 of the decimal input #' @note this implementation uses the built-in function intToBits fracbinary<-function(x){ ##Using integ...
###################################################################### # # GreedyPrioritizer.R # # Implementation of the Additional Greedy prioritization algorithm. # # All of this code was either written by Zachary Douglas Williams or # some other author and is taken from the kanonizo project. # # Modified by Jonathan...
/src/Greedy/FDP_GRD.R
no_license
kauffmj/modificare
R
false
false
18,857
r
###################################################################### # # GreedyPrioritizer.R # # Implementation of the Additional Greedy prioritization algorithm. # # All of this code was either written by Zachary Douglas Williams or # some other author and is taken from the kanonizo project. # # Modified by Jonathan...
#' Extract start-/stop-related details from getActivityChangelog() output #' #' @param changelog #' #' @return data.frame #' @export #' #' @examples #' extractChangelogTiming(getActivityChangelog("298487")) extractChangelogTiming <- function(changelog) { if(!("activityParameters.state.previousValue" %in% names(cha...
/R/stylers.R
no_license
derring-do/adobeTaRget
R
false
false
725
r
#' Extract start-/stop-related details from getActivityChangelog() output #' #' @param changelog #' #' @return data.frame #' @export #' #' @examples #' extractChangelogTiming(getActivityChangelog("298487")) extractChangelogTiming <- function(changelog) { if(!("activityParameters.state.previousValue" %in% names(cha...
#' InitiateGA #' #' Initiate the genetic algorithm on defined model features #' @param nmods Numeric. The number of all possible models #' @param nindiv Numeric. The number of individuals per generation #' @param control Optional. Control stream template if model control stream does not exist yet. #' @param alltokens...
/pkga/R/InitiaiteGA.R
no_license
StevenQPMx/nmga
R
false
false
6,973
r
#' InitiateGA #' #' Initiate the genetic algorithm on defined model features #' @param nmods Numeric. The number of all possible models #' @param nindiv Numeric. The number of individuals per generation #' @param control Optional. Control stream template if model control stream does not exist yet. #' @param alltokens...
#!/usr/bin/env Rscript source("rustr.R") for (dtype in c("rp", "tr", "di")) { rust_file <- paste(dtype, "aminoacid/RUST_aminoacid_12-Jun-18_11.37", sep = "_") rust_data <- read.rust(rust_file) fig <- logo.rust(rust_data, threshold = FALSE, use_expected = TRUE) fig <- fig + ylim(c(-6, 3.5)) ...
/rust_analysis/codon/plot_logos.R
no_license
gatfieldlab/disome_codebase
R
false
false
417
r
#!/usr/bin/env Rscript source("rustr.R") for (dtype in c("rp", "tr", "di")) { rust_file <- paste(dtype, "aminoacid/RUST_aminoacid_12-Jun-18_11.37", sep = "_") rust_data <- read.rust(rust_file) fig <- logo.rust(rust_data, threshold = FALSE, use_expected = TRUE) fig <- fig + ylim(c(-6, 3.5)) ...
getDataInsightEngaged = function(pageID, token, start_date, end_date){ start_date = dmy(strftime(start_date, "%d/%m/%Y")) - days(1) since_start = dmy(strftime(start_date, "%d/%m/%Y")) + days(1) since_start_midnight = strftime(since_start, "%Y-%m-%d %H:%M:%S") until_midnight = strftime(end_date, "%Y-%m-%d 23:59:59"...
/back-end/report_templates/shared/getDataInsightEngaged.R
no_license
ACSVN/SNS-Report
R
false
false
594
r
getDataInsightEngaged = function(pageID, token, start_date, end_date){ start_date = dmy(strftime(start_date, "%d/%m/%Y")) - days(1) since_start = dmy(strftime(start_date, "%d/%m/%Y")) + days(1) since_start_midnight = strftime(since_start, "%Y-%m-%d %H:%M:%S") until_midnight = strftime(end_date, "%Y-%m-%d 23:59:59"...
## The pretty figures file # Environment ------------------------------------------------------------- source("src/RePAIR_functions.R") # Figure 1 ---------------------------------------------------------------- # import individual images pow_ach <- readRDS(paste0(path_fig_inter, "power_achieved.rds")) theor_pow <- r...
/src/main_figures.R
permissive
valeriabonapersona/RePAIR
R
false
false
3,175
r
## The pretty figures file # Environment ------------------------------------------------------------- source("src/RePAIR_functions.R") # Figure 1 ---------------------------------------------------------------- # import individual images pow_ach <- readRDS(paste0(path_fig_inter, "power_achieved.rds")) theor_pow <- r...
library(RISmed) #res <- EUtilsSummary("", # type="esearch", # db="pubmed", # datetype='pdat', # mindate="2018/07/01", # maxdate="2018/07/31", # retmax=120000) res <- EUtilsSummary("", ...
/Beginning_of_solution_with_RISmed_package.R
no_license
magnusahlstroem/Developing_Data_Products2
R
false
false
1,118
r
library(RISmed) #res <- EUtilsSummary("", # type="esearch", # db="pubmed", # datetype='pdat', # mindate="2018/07/01", # maxdate="2018/07/31", # retmax=120000) res <- EUtilsSummary("", ...
# get the dataset from https://spark-public.s3.amazonaws.com/dataanalysis/face.rda # you probably want to use stats::prcomp for PCA on big matrices load('~/face.rda') runPCA <- function(mat = 'Unadjusted matrix') eigen(cov(apply(mat, 2, function(i) i - mean(i)))) pca <- runPCA(faceData) varExplained <- function(eigenLi...
/RstudioPLS206/face.R
no_license
emilioalaca/PLS206_R_files
R
false
false
1,949
r
# get the dataset from https://spark-public.s3.amazonaws.com/dataanalysis/face.rda # you probably want to use stats::prcomp for PCA on big matrices load('~/face.rda') runPCA <- function(mat = 'Unadjusted matrix') eigen(cov(apply(mat, 2, function(i) i - mean(i)))) pca <- runPCA(faceData) varExplained <- function(eigenLi...
# f <- function(X) apply(X, 1, function(x) prod(sin((x-.5)^2))) f <- function(X) apply(X, 1, function(x) prod(sin(2*pi*( x * (seq(0,1,l=1+length(x))[-1])^2 ))) ) n <- 20 set.seed(123) X <- cbind(runif(n),runif(n)) y <- f(X) d = ncol(X) x=seq(0,1,,51) contour(x,x,matrix(f(as.matrix(expand.grid(x,x))),nrow=length(x)),...
/bindings/R/rlibkriging/tests/testthat/test-KrigingMethods.R
permissive
libKriging/libKriging
R
false
false
6,069
r
# f <- function(X) apply(X, 1, function(x) prod(sin((x-.5)^2))) f <- function(X) apply(X, 1, function(x) prod(sin(2*pi*( x * (seq(0,1,l=1+length(x))[-1])^2 ))) ) n <- 20 set.seed(123) X <- cbind(runif(n),runif(n)) y <- f(X) d = ncol(X) x=seq(0,1,,51) contour(x,x,matrix(f(as.matrix(expand.grid(x,x))),nrow=length(x)),...
## load external libraries library(gbm) ## base pacakges for regression trees library(dismo) ## SDM package --> boosted regression tree function library(raster) ## for raster manipulation library(SDMTools) ## for accuracy assessment library(RMySQL) ## for database communication library(rgdal) library(parallel) ## p...
/R/time_sdm_generic.R
no_license
WilliamsPaleoLab/Farley_Optimizing_Computing_SDMs
R
false
false
8,773
r
## load external libraries library(gbm) ## base pacakges for regression trees library(dismo) ## SDM package --> boosted regression tree function library(raster) ## for raster manipulation library(SDMTools) ## for accuracy assessment library(RMySQL) ## for database communication library(rgdal) library(parallel) ## p...
############################################################################## ############################################################################## #This code is to conduct analyses for the example in the manuscript titled #"Adding noise to Markov cohort models" #under review at MDM journal #author: Rowan Isk...
/SDE_manuscript_example2.R
no_license
rowaniskandar/SDE
R
false
false
15,148
r
############################################################################## ############################################################################## #This code is to conduct analyses for the example in the manuscript titled #"Adding noise to Markov cohort models" #under review at MDM journal #author: Rowan Isk...
## These functions combined gives a method to calc the inverse of a Matrix ## in a cost effective way by caching the inverse result ## functions do ## Creates a special Matrix that caches its inverse value makeCacheMatrix <- function(x = matrix()) { i <- NULL; set <- function(y){ x <<- y ...
/cachematrix.R
no_license
fmoura/ProgrammingAssignment2
R
false
false
961
r
## These functions combined gives a method to calc the inverse of a Matrix ## in a cost effective way by caching the inverse result ## functions do ## Creates a special Matrix that caches its inverse value makeCacheMatrix <- function(x = matrix()) { i <- NULL; set <- function(y){ x <<- y ...