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
library(compareGroups) ### Name: export2xls ### Title: Exporting descriptives table to Exel format (.xlsx or .xls) ### Aliases: export2xls ### Keywords: utilities ### ** Examples ## Not run: ##D require(compareGroups) ##D data(regicor) ##D res <- compareGroups(sex ~. -id-todeath-death-tocv-cv, regicor) ##D export...
/data/genthat_extracted_code/compareGroups/examples/export2xls.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
410
r
library(compareGroups) ### Name: export2xls ### Title: Exporting descriptives table to Exel format (.xlsx or .xls) ### Aliases: export2xls ### Keywords: utilities ### ** Examples ## Not run: ##D require(compareGroups) ##D data(regicor) ##D res <- compareGroups(sex ~. -id-todeath-death-tocv-cv, regicor) ##D export...
#' Function to expose Stan user-defined functions in R using CmdStanr and Rcpp. #' #' In addition to all user-defined functions, this function will expose the #' stan_rng__(seed) function, that can be used to supplied specific seeds to #' Stan RNG UDFs. #' #' The function is licensed under BSD-3. For details see the ...
/posts/post-1-vasciek/expose_cmdstanr_funs.R
permissive
spinkney/spinkney.github.io
R
false
false
7,072
r
#' Function to expose Stan user-defined functions in R using CmdStanr and Rcpp. #' #' In addition to all user-defined functions, this function will expose the #' stan_rng__(seed) function, that can be used to supplied specific seeds to #' Stan RNG UDFs. #' #' The function is licensed under BSD-3. For details see the ...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/lung_other.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.4,family="gaussian",standardize=TRUE) sink('./lung_other_051.txt',append=TR...
/Model/EN/ReliefF/lung_other/lung_other_051.R
no_license
esbgkannan/QSMART
R
false
false
353
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/lung_other.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.4,family="gaussian",standardize=TRUE) sink('./lung_other_051.txt',append=TR...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fasttext.R \name{fasttext} \alias{fasttext} \title{Extract word vectors from fasttext word embedding} \source{ \url{https://fasttext.cc/} } \usage{ fasttext( text, tokenizer = text2vec::space_tokenizer, dim = 10L, type = c("skip-gram"...
/man/fasttext.Rd
permissive
EmilHvitfeldt/wordsalad
R
false
true
2,560
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fasttext.R \name{fasttext} \alias{fasttext} \title{Extract word vectors from fasttext word embedding} \source{ \url{https://fasttext.cc/} } \usage{ fasttext( text, tokenizer = text2vec::space_tokenizer, dim = 10L, type = c("skip-gram"...
library(impulse) set.seed(123) timecourses <- simulate_timecourses(n = 2, observation_level_noise = 0.5) measurements <- timecourses %>% tidyr::unnest_legacy(measurements) %>% # separate by true model tidyr::nest_legacy(-true_model, .key = "measurements") %>% # fit all models to each timecourse tidyr::cross...
/tests/testthat/test-likelihood.R
permissive
calico/impulse
R
false
false
4,327
r
library(impulse) set.seed(123) timecourses <- simulate_timecourses(n = 2, observation_level_noise = 0.5) measurements <- timecourses %>% tidyr::unnest_legacy(measurements) %>% # separate by true model tidyr::nest_legacy(-true_model, .key = "measurements") %>% # fit all models to each timecourse tidyr::cross...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barebonesCoNet.R \name{filterTaxonMatrix} \alias{filterTaxonMatrix} \title{Filter taxa in an abundance matrix} \usage{ filterTaxonMatrix( x, minocc = 0, keepSum = FALSE, return.filtered.indices = FALSE ) } \arguments{ \item{x}{taxon a...
/man/filterTaxonMatrix.Rd
permissive
hallucigenia-sparsa/seqgroup
R
false
true
893
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barebonesCoNet.R \name{filterTaxonMatrix} \alias{filterTaxonMatrix} \title{Filter taxa in an abundance matrix} \usage{ filterTaxonMatrix( x, minocc = 0, keepSum = FALSE, return.filtered.indices = FALSE ) } \arguments{ \item{x}{taxon a...
library(ggplot2) if(!file.exists("./PM25.zip")){ fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileUrl, destfile="./PM25.zip", method="curl") unzip(zipfile="./PM25.zip", exdir="./") } if(!file.exists("summarySCC_PM25.rds") || !file.exists("Source...
/plot4.R
no_license
rebeccalauyl/ExData_Project2
R
false
false
1,451
r
library(ggplot2) if(!file.exists("./PM25.zip")){ fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileUrl, destfile="./PM25.zip", method="curl") unzip(zipfile="./PM25.zip", exdir="./") } if(!file.exists("summarySCC_PM25.rds") || !file.exists("Source...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classesPlot.R \name{classesPlot} \alias{classesPlot} \title{Plot to look at the percentage of each class in the data} \usage{ classesPlot(ftmsObj, xaxis = NULL, ylabel = "Percentage of Chemical Classes", title = NULL, vkBoundarySet = "bs1...
/man/classesPlot.Rd
permissive
EMSL-Computing/ftmsRanalysis
R
false
true
1,220
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classesPlot.R \name{classesPlot} \alias{classesPlot} \title{Plot to look at the percentage of each class in the data} \usage{ classesPlot(ftmsObj, xaxis = NULL, ylabel = "Percentage of Chemical Classes", title = NULL, vkBoundarySet = "bs1...
# =================================================================== # Title: make-shots-charts-script # Description: create shot charts # Input(s): .jpg for nba court # Output(s): .pdf files for shot charts # Author(s): Ren Yi Wang # Date: 03-06-2018 # =================================================================...
/R projects/hw02/code/make-shot-charts-script.R
no_license
RenYiWang/Ren-Yi-Wang-s-repo
R
false
false
3,190
r
# =================================================================== # Title: make-shots-charts-script # Description: create shot charts # Input(s): .jpg for nba court # Output(s): .pdf files for shot charts # Author(s): Ren Yi Wang # Date: 03-06-2018 # =================================================================...
###################################################################################### ## ###################################################################################### growth.10y <- function(land, clim){ select <- dplyr::select ## Tracking cat("Species growth", "\n") ## Read coefficients growth.c...
/Medfire/mdl/growth.r
no_license
nuaquilue/ONEKM
R
false
false
2,425
r
###################################################################################### ## ###################################################################################### growth.10y <- function(land, clim){ select <- dplyr::select ## Tracking cat("Species growth", "\n") ## Read coefficients growth.c...
############ 8. ########### 2.7.18 Elizabeth Tokarz ############# Repeat extraction of PRISM climate data, but for GBIF distribution ############# Q alba ############## Q rubra ############# ############### INPUT: climate RasterLayers from PRISM database (.bil files), ############### AND occurrence data from ...
/8.020718_extract_PRISM_commonGBIF.R
no_license
doctoretdiez/common_Quercus
R
false
false
4,900
r
############ 8. ########### 2.7.18 Elizabeth Tokarz ############# Repeat extraction of PRISM climate data, but for GBIF distribution ############# Q alba ############## Q rubra ############# ############### INPUT: climate RasterLayers from PRISM database (.bil files), ############### AND occurrence data from ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boostgeom.R \name{bg_intersects} \alias{bg_intersects} \alias{bg_intersects,BoostMultiPolygons,BoostBoxGrid-method} \alias{bg_intersects,BoostMultiLines,BoostBoxGrid-method} \alias{bg_intersects,BoostMultiPolygons,BoostPointGrid-method} \alia...
/man/bg_intersects.generic.Rd
no_license
JimColl/velox
R
false
true
1,509
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boostgeom.R \name{bg_intersects} \alias{bg_intersects} \alias{bg_intersects,BoostMultiPolygons,BoostBoxGrid-method} \alias{bg_intersects,BoostMultiLines,BoostBoxGrid-method} \alias{bg_intersects,BoostMultiPolygons,BoostPointGrid-method} \alia...
\name{gfci} \alias{gfci} \title{Greedy Fast Causal Inference Algorithm on Continuous Data} \description{ \code{gfci} is the revised Fast Causal Inference (FCI) algorithm. } \usage{ gfci(df, penaltydiscount = 2.0, maxDegree = 3, maxPathLength = -1, significance = 0.05, completeRuleSetUsed = FALSE, faithfulnessAssum...
/man/gfci.Rd
no_license
Yezihahaha/r-causal
R
false
false
3,316
rd
\name{gfci} \alias{gfci} \title{Greedy Fast Causal Inference Algorithm on Continuous Data} \description{ \code{gfci} is the revised Fast Causal Inference (FCI) algorithm. } \usage{ gfci(df, penaltydiscount = 2.0, maxDegree = 3, maxPathLength = -1, significance = 0.05, completeRuleSetUsed = FALSE, faithfulnessAssum...
#---------------- Coordinates - S6, L70 #limits #zooming in & out w + geom_point(aes(size=BudgetMillions)) + geom_smooth() + facet_grid(Genre~Year) m <- ggplot(data=movies, aes(x=CriticRating, y=AudienceRating, size=BudgetMillions, colour=Genre)) m + g...
/Section 6 - Advance Visualization/L70_coordinates.R
no_license
ceskipper/R-Programming-A-Z
R
false
false
1,100
r
#---------------- Coordinates - S6, L70 #limits #zooming in & out w + geom_point(aes(size=BudgetMillions)) + geom_smooth() + facet_grid(Genre~Year) m <- ggplot(data=movies, aes(x=CriticRating, y=AudienceRating, size=BudgetMillions, colour=Genre)) m + g...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getMaxPageNum.R \name{getMaxPageNum} \alias{getMaxPageNum} \title{Get Max Page Number} \usage{ getMaxPageNum(turl = url, max = 100) } \arguments{ \item{turl}{is target url include sid1, sid2, date like below. 'http://news.naver.com/main/list....
/man/getMaxPageNum.Rd
permissive
dexterbox/N2H4
R
false
true
518
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getMaxPageNum.R \name{getMaxPageNum} \alias{getMaxPageNum} \title{Get Max Page Number} \usage{ getMaxPageNum(turl = url, max = 100) } \arguments{ \item{turl}{is target url include sid1, sid2, date like below. 'http://news.naver.com/main/list....
library(RcmdrMisc) ### Name: Gumbel ### Title: The Gumbel Distribution ### Aliases: Gumbel dgumbel pgumbel qgumbel rgumbel ### Keywords: distribution ### ** Examples x <- 100 + 5*c(-Inf, -1, 0, 1, 2, 3, Inf, NA) dgumbel(x, 100, 5) pgumbel(x, 100, 5) p <- c(0, .25, .5, .75, 1, NA) qgumbel(p, 100, 5) summary(rgumbe...
/data/genthat_extracted_code/RcmdrMisc/examples/gumbel.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
339
r
library(RcmdrMisc) ### Name: Gumbel ### Title: The Gumbel Distribution ### Aliases: Gumbel dgumbel pgumbel qgumbel rgumbel ### Keywords: distribution ### ** Examples x <- 100 + 5*c(-Inf, -1, 0, 1, 2, 3, Inf, NA) dgumbel(x, 100, 5) pgumbel(x, 100, 5) p <- c(0, .25, .5, .75, 1, NA) qgumbel(p, 100, 5) summary(rgumbe...
## —————————————————————————————————————————————————————————————————————— ## Analyse de données compositionnelles ## par création d'un graphe et recherche de structures dans ce graphe ## ## © Emmanuel Curis, novembre 2017 ## ## Export d'un graphe au format dot de graphviz ## ———————————————————————————————————————————...
/R/export_dot.R
no_license
cran/SARP.compo
R
false
false
3,769
r
## —————————————————————————————————————————————————————————————————————— ## Analyse de données compositionnelles ## par création d'un graphe et recherche de structures dans ce graphe ## ## © Emmanuel Curis, novembre 2017 ## ## Export d'un graphe au format dot de graphviz ## ———————————————————————————————————————————...
# Load data data(iris) # Calculate the mean Petal Length petal_length_mean <- mean(iris$Petal.Length) # Plot the distribution of the Petal Length hist(iris$Petal.Length, main="Histogram for Petal Length", xlab="Petal Length", las=1) # Probability Density of the Petal Length hist(iris$Petal.Length, ...
/week_01/case_study_01.R
no_license
geo511-2020/geo511-2020-tasks-tingtchang
R
false
false
1,179
r
# Load data data(iris) # Calculate the mean Petal Length petal_length_mean <- mean(iris$Petal.Length) # Plot the distribution of the Petal Length hist(iris$Petal.Length, main="Histogram for Petal Length", xlab="Petal Length", las=1) # Probability Density of the Petal Length hist(iris$Petal.Length, ...
# Copyrights (C) 2014 Thiago do Rego Sousa <thiagoestatistico@gmail.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any late...
/GEVStableGarch/R/dist-gat.R
no_license
ingted/R-Examples
R
false
false
7,279
r
# Copyrights (C) 2014 Thiago do Rego Sousa <thiagoestatistico@gmail.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any late...
# Various Gradient-based optimization routines: steepest descent, conjugate # gradient, BFGS etc. # Gradient Direction ----------------------------------------------------------- # Creates a direction sub stage make_direction <- function(sub_stage) { make_sub_stage(sub_stage, 'direction') } # Steepest Descent # # ...
/R/gradient.R
permissive
cdriveraus/mize
R
false
false
33,940
r
# Various Gradient-based optimization routines: steepest descent, conjugate # gradient, BFGS etc. # Gradient Direction ----------------------------------------------------------- # Creates a direction sub stage make_direction <- function(sub_stage) { make_sub_stage(sub_stage, 'direction') } # Steepest Descent # # ...
## randomized regression tree growing ## with split selection using ns randomly chosen attributes at each node ## (if unspecified or 0, it defaults to the square root of the number of attributes) grow.randregtree <- function(formula, data, ns=0, minvar=0.005, minsplit=2, maxdepth=8) { ini...
/R/model-ensembles-random-regression-tree.R
no_license
42n4/dmr.ensemble
R
false
false
3,251
r
## randomized regression tree growing ## with split selection using ns randomly chosen attributes at each node ## (if unspecified or 0, it defaults to the square root of the number of attributes) grow.randregtree <- function(formula, data, ns=0, minvar=0.005, minsplit=2, maxdepth=8) { ini...
# ui.R library(shiny) library(dplyr) library(tidyverse) # read in data confirmed <- "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv" data.confirmed <- read_csv(confirmed) #data.no.US <- data.confirmed[data.confirmed$`Co...
/covid-19/.Rproj.user/71CF0834/sources/s-DC5CE09A/74B5E182-contents
permissive
maxeyre/Homeless-COVID-19
R
false
false
2,960
# ui.R library(shiny) library(dplyr) library(tidyverse) # read in data confirmed <- "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv" data.confirmed <- read_csv(confirmed) #data.no.US <- data.confirmed[data.confirmed$`Co...
library(BB) library(truncnorm) library(TruncatedNormal) ###The study period is from Jan. 21 to Mar. 22. In this code, Jan. 21 is viewed as day 1. ###The study region includes 14 metropolitan areas in the U.S. ###The directory where observed case data, population data and mobility data are stored ###All data h...
/COVID19_models/distributable version/SEIR model (estimation).R
no_license
UW-THINKlab/NSF-RAPID-COVID19
R
false
false
10,814
r
library(BB) library(truncnorm) library(TruncatedNormal) ###The study period is from Jan. 21 to Mar. 22. In this code, Jan. 21 is viewed as day 1. ###The study region includes 14 metropolitan areas in the U.S. ###The directory where observed case data, population data and mobility data are stored ###All data h...
\name{corbivgeomRoy} \alias{corbivgeomRoy} \title{ Linear correlation } \description{ Linear correlation for Roy's bivariate geometric model } \usage{ corbivgeomRoy(theta1, theta2, theta3) } \arguments{ \item{theta1}{ paramater \eqn{\theta_1} } \item{theta2}{ paramater \eqn{\theta_2} } \item{the...
/man/corbivgeomRoy.Rd
no_license
cran/bivgeom
R
false
false
1,073
rd
\name{corbivgeomRoy} \alias{corbivgeomRoy} \title{ Linear correlation } \description{ Linear correlation for Roy's bivariate geometric model } \usage{ corbivgeomRoy(theta1, theta2, theta3) } \arguments{ \item{theta1}{ paramater \eqn{\theta_1} } \item{theta2}{ paramater \eqn{\theta_2} } \item{the...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{compare_imp} \alias{compare_imp} \title{Comparing imputations and original data distributions} \usage{ compare_imp(df, origin, target) } \arguments{ \item{df}{data.frame with origin variable and the new one with imputations} \i...
/man/compare_imp.Rd
no_license
Polkas/miceFast
R
false
true
1,035
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{compare_imp} \alias{compare_imp} \title{Comparing imputations and original data distributions} \usage{ compare_imp(df, origin, target) } \arguments{ \item{df}{data.frame with origin variable and the new one with imputations} \i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ccrtm.R \docType{data} \name{soil} \alias{soil} \title{soil reflectance} \usage{ data(soil) } \description{ soil reflectance } \section{details}{ *********************************************************************** \itemize{ \item [1] = ...
/man/soil.Rd
no_license
cran/ccrtm
R
false
true
552
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ccrtm.R \docType{data} \name{soil} \alias{soil} \title{soil reflectance} \usage{ data(soil) } \description{ soil reflectance } \section{details}{ *********************************************************************** \itemize{ \item [1] = ...
## Put comments here that give an overall description of what your ## functions do ## Equivalent to POJO with setter and getter in JAVA. This function creates the cached matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL...
/cachematrix.R
no_license
geopolitics-diplomacy/ProgrammingAssignment2
R
false
false
1,017
r
## Put comments here that give an overall description of what your ## functions do ## Equivalent to POJO with setter and getter in JAVA. This function creates the cached matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL...
#### libraries library(readr) library(dplyr) library(tidyr) library(ggplot2) library(gridExtra) library(mgcv) library(popbio) #### read data file dat_raw <- read_csv('data/lemna-temp-light-2013.csv') %>% mutate(treat = paste(light, temp, sep = '-')) #### subset to fronds not contaminated prior to death dat ...
/scripts.R
no_license
patrickbarks/temp-light
R
false
false
16,829
r
#### libraries library(readr) library(dplyr) library(tidyr) library(ggplot2) library(gridExtra) library(mgcv) library(popbio) #### read data file dat_raw <- read_csv('data/lemna-temp-light-2013.csv') %>% mutate(treat = paste(light, temp, sep = '-')) #### subset to fronds not contaminated prior to death dat ...
source('downloadData.R') # Reading in data NEI <- readRDS("data/summarySCC_PM25.rds") SCC <- readRDS("data/Source_Classification_Code.rds") options(scipen=5) # bias against scientific notation # plot1.R: Have total emissions from PM2.5 decreased in the United States from 1999 to 2008? plot1data<-NEI %>% group_by(yea...
/plot1.R
no_license
Phippsy/airquality-examinations
R
false
false
762
r
source('downloadData.R') # Reading in data NEI <- readRDS("data/summarySCC_PM25.rds") SCC <- readRDS("data/Source_Classification_Code.rds") options(scipen=5) # bias against scientific notation # plot1.R: Have total emissions from PM2.5 decreased in the United States from 1999 to 2008? plot1data<-NEI %>% group_by(yea...
library(igraph) myGraph <- read.csv(file.choose(),header = T) myGraph <- graph.data.frame (myGraph,directed=F) myGraph plot(myGraph) plot(myGraph,vertex.size=3, vertex.color="red") all_shortest_paths(myGraph,1,2) betweenness(myGraph) edge.betweenness.community(myGraph) #shortest.paths(myGraph) #page.rank(myGraph)
/Edge Betweenness/edgebetweenness.R
no_license
MarwaTalaat/Mining-Social-Media
R
false
false
314
r
library(igraph) myGraph <- read.csv(file.choose(),header = T) myGraph <- graph.data.frame (myGraph,directed=F) myGraph plot(myGraph) plot(myGraph,vertex.size=3, vertex.color="red") all_shortest_paths(myGraph,1,2) betweenness(myGraph) edge.betweenness.community(myGraph) #shortest.paths(myGraph) #page.rank(myGraph)
#### All methods for "diagonalMatrix" and its subclasses, #### currently "ddiMatrix", "ldiMatrix" ## Purpose: Constructor of diagonal matrices -- ~= diag() , ## but *not* diag() extractor! Diagonal <- function(n, x = NULL) { ## Allow Diagonal(4), Diagonal(x=1:5), and Diagonal(4, TRUE) n <- if(missi...
/R/diagMatrix.R
no_license
bedatadriven/renjin-matrix
R
false
false
48,551
r
#### All methods for "diagonalMatrix" and its subclasses, #### currently "ddiMatrix", "ldiMatrix" ## Purpose: Constructor of diagonal matrices -- ~= diag() , ## but *not* diag() extractor! Diagonal <- function(n, x = NULL) { ## Allow Diagonal(4), Diagonal(x=1:5), and Diagonal(4, TRUE) n <- if(missi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ml_trainpredict.R \name{ml_trainpredict} \alias{ml_trainpredict} \title{Train and predict a Machine Learning model} \usage{ ml_trainpredict(train_set = NULL, valid_set = NULL, ycol = 1, IDinfo = NULL, mlalgo = "xgboost", mlpar = NULL) } \ar...
/man/ml_trainpredict.Rd
no_license
jeanmarcgp/mlStocks
R
false
true
2,261
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ml_trainpredict.R \name{ml_trainpredict} \alias{ml_trainpredict} \title{Train and predict a Machine Learning model} \usage{ ml_trainpredict(train_set = NULL, valid_set = NULL, ycol = 1, IDinfo = NULL, mlalgo = "xgboost", mlpar = NULL) } \ar...
# stan model Logistic Regression source("logistic_regression_setup.R") library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = 1) betaPrior = function(d) { return(diag(rep(1, d))) } # simulated data d = 100 N = 1000 set.seed(123) dataLR_stan = genDataLR(d, N + 250, algorithm = 'STAN') names(dataLR_st...
/logistic_regression/stan.R
no_license
maurilorenzo/the-stochastic-Barker-proposal
R
false
false
1,507
r
# stan model Logistic Regression source("logistic_regression_setup.R") library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = 1) betaPrior = function(d) { return(diag(rep(1, d))) } # simulated data d = 100 N = 1000 set.seed(123) dataLR_stan = genDataLR(d, N + 250, algorithm = 'STAN') names(dataLR_st...
## In this script, we process mixtures derived from human brain samples ################################################################################################################################ # ## Setup ---- ## Generic rm(list = ls()) gc() options(stringsAsFactors = FALSE) ## Set directory # Not setting th...
/OldScripts/1a_Preprocessing_BrainMixtures.R
no_license
Voineagulab/BrainCellularComposition
R
false
false
26,490
r
## In this script, we process mixtures derived from human brain samples ################################################################################################################################ # ## Setup ---- ## Generic rm(list = ls()) gc() options(stringsAsFactors = FALSE) ## Set directory # Not setting th...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/schemeName.R \name{schemeName} \alias{schemeName} \title{schemeName} \usage{ schemeName(system = NULL) } \arguments{ \item{system}{The data management system within which an identifier is in scope and therefore unique. This is typically a URL...
/man/schemeName.Rd
permissive
cboettig/build.eml
R
false
true
674
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/schemeName.R \name{schemeName} \alias{schemeName} \title{schemeName} \usage{ schemeName(system = NULL) } \arguments{ \item{system}{The data management system within which an identifier is in scope and therefore unique. This is typically a URL...
#' Distances to Class Centroids #' #' `step_classdist` creates a a *specification* of a #' recipe step that will convert numeric data into Mahalanobis #' distance measurements to the data centroid. This is done for #' each value of a categorical class variable. #' #' @inheritParams step_center #' @param ... One or m...
/R/classdist.R
no_license
kevinwkc/recipes
R
false
false
6,963
r
#' Distances to Class Centroids #' #' `step_classdist` creates a a *specification* of a #' recipe step that will convert numeric data into Mahalanobis #' distance measurements to the data centroid. This is done for #' each value of a categorical class variable. #' #' @inheritParams step_center #' @param ... One or m...
library(RAMpath) ### Name: plot.RAMpath ### Title: Plot the path diagram according to RAM path and bridges or Plot ### the vector field for the bivariate latent change score model ### Aliases: plot.RAMpath plot plot.blcs ### ** Examples data(ex3) test.blcs<-ramBLCS(ex3, 1:6, 7:12, ram.out=TRUE) ramVF(test.blcs, c...
/data/genthat_extracted_code/RAMpath/examples/plot.RAMpath.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
480
r
library(RAMpath) ### Name: plot.RAMpath ### Title: Plot the path diagram according to RAM path and bridges or Plot ### the vector field for the bivariate latent change score model ### Aliases: plot.RAMpath plot plot.blcs ### ** Examples data(ex3) test.blcs<-ramBLCS(ex3, 1:6, 7:12, ram.out=TRUE) ramVF(test.blcs, c...
\name{XRcppExamples-package} \alias{XRcppExamples-package} \alias{XRcppExamples} \docType{package} \title{ Dummy package part of Rcpp unit testing } \description{ Dummy package part of Rcpp unit testing } \details{ \tabular{ll}{ Package: \tab XRcppExamples\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2010-0...
/man/XRcppExamples-package.Rd
no_license
johnmchambers/XRcppExamples
R
false
false
402
rd
\name{XRcppExamples-package} \alias{XRcppExamples-package} \alias{XRcppExamples} \docType{package} \title{ Dummy package part of Rcpp unit testing } \description{ Dummy package part of Rcpp unit testing } \details{ \tabular{ll}{ Package: \tab XRcppExamples\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2010-0...
makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set, get =...
/cachematrix.R
no_license
ssnehasingh/datasciencecoursera
R
false
false
731
r
makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set, get =...
list.of.packages <- c("leaflet", "htmlwidgets") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) # Start Script Here: ------------------------------------------------------ library(leaflet) my.path = 'new assignment.c...
/generate_map_html_file.R
no_license
VicenteVillasenor/VicenteVillasenor.github.io
R
false
false
925
r
list.of.packages <- c("leaflet", "htmlwidgets") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) # Start Script Here: ------------------------------------------------------ library(leaflet) my.path = 'new assignment.c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elnet_coord.r \name{elnet_coord} \alias{elnet_coord} \title{Solving elastic net via coordinate descent} \usage{ elnet_coord(y, X, Lambda, alpha, beta_init, iterlength) } \arguments{ \item{y}{The response vector} \item{X}{Design matrix} \ite...
/man/elnet_coord.Rd
no_license
samlahiry/hw2
R
false
true
777
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elnet_coord.r \name{elnet_coord} \alias{elnet_coord} \title{Solving elastic net via coordinate descent} \usage{ elnet_coord(y, X, Lambda, alpha, beta_init, iterlength) } \arguments{ \item{y}{The response vector} \item{X}{Design matrix} \ite...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/uvhydrograph-render.R \name{YEndpoint} \alias{YEndpoint} \title{Compute the y-axis endpoint, based on a heuristic.} \usage{ YEndpoint(corr.value.sequence, uncorr.value.sequence) } \arguments{ \item{corr.value.sequence}{A sequence of corrected...
/man/YEndpoint.Rd
permissive
ee-usgs/repgen
R
false
true
534
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/uvhydrograph-render.R \name{YEndpoint} \alias{YEndpoint} \title{Compute the y-axis endpoint, based on a heuristic.} \usage{ YEndpoint(corr.value.sequence, uncorr.value.sequence) } \arguments{ \item{corr.value.sequence}{A sequence of corrected...
# KAGGLE COMPETITION - DEALING WITH THE TEXT DATA # This script file is intended to help you deal with the text data provided in the competition data files # If you haven't already, start by reading the data into R # Make sure you have downloaded these files from the Kaggle website, and have navigated to the director...
/CapstoneProject/Competition_TextData.R
no_license
sharathlives/MIT-edx-AnalyticsEdge-StatsiticalModeling
R
false
false
4,318
r
# KAGGLE COMPETITION - DEALING WITH THE TEXT DATA # This script file is intended to help you deal with the text data provided in the competition data files # If you haven't already, start by reading the data into R # Make sure you have downloaded these files from the Kaggle website, and have navigated to the director...
\name{river} \docType{data} \alias{river} \usage{data(river)} \title{New York river data} \description{ This is a data set selected from book "Regression by examples" by Samprit Chatterjee and Ali S. Hadi. } \format{In a 1976 study exploring the relationship between water quality and land use, Haith (1976) obtained the...
/man/river.Rd
no_license
cran/bstats
R
false
false
1,183
rd
\name{river} \docType{data} \alias{river} \usage{data(river)} \title{New York river data} \description{ This is a data set selected from book "Regression by examples" by Samprit Chatterjee and Ali S. Hadi. } \format{In a 1976 study exploring the relationship between water quality and land use, Haith (1976) obtained the...
## Compare early and late periods library(data.table) library(car) library(plyr) library(zoo) library(pracma) ## torn = fread('../Data/tornio.tsv') suwa = fread('../Data/suwa.tsv') tiff('../Figures/variability.calc.check.tiff', res=300, width=2400, height=1800, compression = 'lzw') par(family="serif") plot(range(c...
/R/variability.all.combos.R
no_license
lawinslow/AncientIce
R
false
false
1,060
r
## Compare early and late periods library(data.table) library(car) library(plyr) library(zoo) library(pracma) ## torn = fread('../Data/tornio.tsv') suwa = fread('../Data/suwa.tsv') tiff('../Figures/variability.calc.check.tiff', res=300, width=2400, height=1800, compression = 'lzw') par(family="serif") plot(range(c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_complex_genes.R \name{get_complex_genes} \alias{get_complex_genes} \title{Get all the molecular complexes for a given gene(s)} \usage{ get_complex_genes(complexes = import_Omnipath_complexes(), select_genes, total_match = FALSE) } \argu...
/man/get_complex_genes.Rd
permissive
alberto-valdeolivas/OmnipathR
R
false
true
1,314
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_complex_genes.R \name{get_complex_genes} \alias{get_complex_genes} \title{Get all the molecular complexes for a given gene(s)} \usage{ get_complex_genes(complexes = import_Omnipath_complexes(), select_genes, total_match = FALSE) } \argu...
#' @title Generate lighter or darker version of a color #' @description Produces a linear blend of the color with white or black. #' @param color_hex A character string representing a hex color #' @param strength The "strength" of the blend with white or black, #' where 0 is entirely the original color and 1 is entir...
/R/color.R
permissive
gadenbuie/xaringanthemer
R
false
false
5,690
r
#' @title Generate lighter or darker version of a color #' @description Produces a linear blend of the color with white or black. #' @param color_hex A character string representing a hex color #' @param strength The "strength" of the blend with white or black, #' where 0 is entirely the original color and 1 is entir...
### Creating Simulation library('doParallel') library('MASS') library('highmean') library('highD2pop') library('doRNG') library('dplyr') library('rmutil') library('MTSKNN') library('NonParametricMean') ## Loading Functions source('C:/Users/user/Google Drive/Simes Hotelling Paper/Simes Hoteling V2 - No HC/R Script/F...
/Archive/Parametric Tests/Power/Simulation Script - Power.R
no_license
tfrostig/Simulations-Simes-Hotelling
R
false
false
11,628
r
### Creating Simulation library('doParallel') library('MASS') library('highmean') library('highD2pop') library('doRNG') library('dplyr') library('rmutil') library('MTSKNN') library('NonParametricMean') ## Loading Functions source('C:/Users/user/Google Drive/Simes Hotelling Paper/Simes Hoteling V2 - No HC/R Script/F...
##### HELPER FUNCTIONS ##### #' Finds all the nitrogen entries that need converting & converts them. #' #' @param inflowFile The full set of dates that we have data for #' @param coefficients The slope parameters for that particular data set #' @param medianDOC The median DOC value being used to estimate #' @param me...
/Mendota/Data Aggregation/Exploratory Scripts/inflow_plotting.R
no_license
CareyLabVT/Mendota_Sunapee_NP
R
false
false
46,636
r
##### HELPER FUNCTIONS ##### #' Finds all the nitrogen entries that need converting & converts them. #' #' @param inflowFile The full set of dates that we have data for #' @param coefficients The slope parameters for that particular data set #' @param medianDOC The median DOC value being used to estimate #' @param me...
# write integral functions to test bounds # ten values # rbarsharp function - can use for both rbar1sharp and rbar2sharp integrand_rsharp <- function(u, mu1, mu2, sigma, delta){ mu <- mu1-mu2 sigma <- sqrt(2)*sigma pdf1 <- (1/(sigma*sqrt(2*pi))*exp((-1/2)*((u-mu)/sigma)^2)) gr <- log(1-delta+delta*exp(u)) return...
/integration/bounds_check_function.R
no_license
jasminalbert/Albert_ReumanRepo
R
false
false
2,871
r
# write integral functions to test bounds # ten values # rbarsharp function - can use for both rbar1sharp and rbar2sharp integrand_rsharp <- function(u, mu1, mu2, sigma, delta){ mu <- mu1-mu2 sigma <- sqrt(2)*sigma pdf1 <- (1/(sigma*sqrt(2*pi))*exp((-1/2)*((u-mu)/sigma)^2)) gr <- log(1-delta+delta*exp(u)) return...
rm(list = ls()) library(dplyr) library(tidyr) library(stringr) library(ggplot2) library(mice) datapath <- "C:/Users/yfei/Desktop/Kaggle/Titanic/data" # Read in the data training <- read.csv(file.path(datapath, "train.csv"), stringsAsFactors = FALSE) %>% mutate(type = "Training") test <- read.csv(file....
/Data Cleaning.R
no_license
feiyuan1993/Kaggle-Titanic
R
false
false
675
r
rm(list = ls()) library(dplyr) library(tidyr) library(stringr) library(ggplot2) library(mice) datapath <- "C:/Users/yfei/Desktop/Kaggle/Titanic/data" # Read in the data training <- read.csv(file.path(datapath, "train.csv"), stringsAsFactors = FALSE) %>% mutate(type = "Training") test <- read.csv(file....
#' Data Set 10: Manatee Deaths #' #' Annual Florida data for 24 years are provided. #' \itemize{ #' \item YEAR #' \item DEATHS is the annua number of Manatee deaths caused by boats #' \item BOATS is the number of registered pleasure boats (tens of thousands) #' \item POP is the Florida population (millions) #' \item WA...
/R/ds10_Manatee_Deaths.R
no_license
ngay/kustats
R
false
false
554
r
#' Data Set 10: Manatee Deaths #' #' Annual Florida data for 24 years are provided. #' \itemize{ #' \item YEAR #' \item DEATHS is the annua number of Manatee deaths caused by boats #' \item BOATS is the number of registered pleasure boats (tens of thousands) #' \item POP is the Florida population (millions) #' \item WA...
#'Split strings on multiple delimeters #' #' @param x string or vector of strings #' @param separator single or vector of separator delimeters #' @return a list of vectors with split strings #' @details does not support regex matching #' @examples #' strings_to_split<-c('abc def.gh', "def.kl abc 9") #' separation_patte...
/R/strsplit_on_multiple.R
permissive
zackarno/butteR
R
false
false
737
r
#'Split strings on multiple delimeters #' #' @param x string or vector of strings #' @param separator single or vector of separator delimeters #' @return a list of vectors with split strings #' @details does not support regex matching #' @examples #' strings_to_split<-c('abc def.gh', "def.kl abc 9") #' separation_patte...
#forecast <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/EPL_data/probGenerated.csv",header = FALSE) forecast <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/NHL_data/2014/probGenerated.csv") goals <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/NHL_data/2014/goals_test.csv") max_gd = 3 ...
/R_Scripts/IP_model_RPS.R
no_license
adityas16/FirstRepository
R
false
false
3,924
r
#forecast <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/EPL_data/probGenerated.csv",header = FALSE) forecast <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/NHL_data/2014/probGenerated.csv") goals <- read.csv("/home/aditya/BetifyData/AdjustmentEstimation/NHL_data/2014/goals_test.csv") max_gd = 3 ...
library(tourr) ### Name: display_stereo ### Title: Anaglpyh tour path animation. ### Aliases: display_stereo animate_stereo ### Keywords: hplot ### ** Examples animate_stereo(flea[, 1:6])
/data/genthat_extracted_code/tourr/examples/display_stereo.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
195
r
library(tourr) ### Name: display_stereo ### Title: Anaglpyh tour path animation. ### Aliases: display_stereo animate_stereo ### Keywords: hplot ### ** Examples animate_stereo(flea[, 1:6])
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ops-function.R \name{func_load} \alias{func_load} \title{Load Function Model} \usage{ func_load(model, device = NULL) } \arguments{ \item{device}{- instance of DeviceDescriptor} } \description{ Load the model, that has been saved using save()...
/man/func_load.Rd
permissive
Bhaskers-Blu-Org2/CNTK-R
R
false
true
324
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ops-function.R \name{func_load} \alias{func_load} \title{Load Function Model} \usage{ func_load(model, device = NULL) } \arguments{ \item{device}{- instance of DeviceDescriptor} } \description{ Load the model, that has been saved using save()...
##Part 1 makeCacheMatrix makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(inverse) i <<- inverse getInverse <- function() i list(set = set, get = get, setInverse = setI...
/Assignment2.R
no_license
jychong27/RProgrammingAssignment2
R
false
false
649
r
##Part 1 makeCacheMatrix makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(inverse) i <<- inverse getInverse <- function() i list(set = set, get = get, setInverse = setI...
library(ggplot2) # ============================================================================== # GGPLOT_RESIDUALS # ============================================================================== #' ggplot_residuals #' #' Create a plot of observed x valu...
/ggplot.convenience/R/ggplot_models.R
no_license
gpawlik/con-functions-R
R
false
false
7,880
r
library(ggplot2) # ============================================================================== # GGPLOT_RESIDUALS # ============================================================================== #' ggplot_residuals #' #' Create a plot of observed x valu...
# Load drug signatures and corresponding metadata sigs = LoadCDSigs() info = LoadCDInfo() # Construct large tensor out = ConstructTensor(sigs=sigs, info=info, pThresh=0.1, specificDose=FALSE, time='all', print=TRUE, nPerDrug=3, nPerCell=3, removeDuplicates=TRUE) # define 4 tensors (only use two ...
/R/scripts/define_data_tensors.R
no_license
RaymondSHANG/dgc_predict
R
false
false
778
r
# Load drug signatures and corresponding metadata sigs = LoadCDSigs() info = LoadCDInfo() # Construct large tensor out = ConstructTensor(sigs=sigs, info=info, pThresh=0.1, specificDose=FALSE, time='all', print=TRUE, nPerDrug=3, nPerCell=3, removeDuplicates=TRUE) # define 4 tensors (only use two ...
\docType{class} \name{mfhlboot-class} \alias{mfhlboot-class} \title{Class mfhlboot} \usage{ mfhlboot$new(nboot, alpha, seed, compare, rng, sample, MFstat, HLstat, QDIFstat, QXstat, QYstat) } \description{ class for data objects produced by HLBoot, contains class mf with addtional fields \emph{MFstat, HLstat, QDIFstat, ...
/man/mfhlboot-class.Rd
no_license
tmrealphd/MF
R
false
false
1,816
rd
\docType{class} \name{mfhlboot-class} \alias{mfhlboot-class} \title{Class mfhlboot} \usage{ mfhlboot$new(nboot, alpha, seed, compare, rng, sample, MFstat, HLstat, QDIFstat, QXstat, QYstat) } \description{ class for data objects produced by HLBoot, contains class mf with addtional fields \emph{MFstat, HLstat, QDIFstat, ...
if (!require(tidyverse)) install.packages('tidyverse') if (!require(igraph)) install.packages('igraph') if (!require(gtools)) install.packages('gtools') if (!require(tools)) install.packages('tools') if (!require(tuneR)) install.packages('tuneR') library(nonlinearTseries) library(plot3D) library(plotly) library(crqa)...
/input/2019-11-15-letter-to-n-study/nonlinear_analysis_script.R
permissive
thimic/transcendental-information-cascades
R
false
false
8,281
r
if (!require(tidyverse)) install.packages('tidyverse') if (!require(igraph)) install.packages('igraph') if (!require(gtools)) install.packages('gtools') if (!require(tools)) install.packages('tools') if (!require(tuneR)) install.packages('tuneR') library(nonlinearTseries) library(plot3D) library(plotly) library(crqa)...
library(CDECRetrieve) library(ggplot2) MOK_available <- cdec_datasets(station="MOK") MOK_data <- cdec_query(station="MOK", sensor_num=25, start_date="2018-10-01", end_date="2019-09-30", dur_code = "E") ggplot(MOK_d...
/CDEC_Retrieve_example.R
no_license
julianaspector/GageDataRetrievalDemo
R
false
false
532
r
library(CDECRetrieve) library(ggplot2) MOK_available <- cdec_datasets(station="MOK") MOK_data <- cdec_query(station="MOK", sensor_num=25, start_date="2018-10-01", end_date="2019-09-30", dur_code = "E") ggplot(MOK_d...
library(airGR) ### Name: BasinInfo ### Title: Data sample: characteristics of a fictional catchment (L0123001, ### L0123002 or L0123003) ### Aliases: BasinInfo ### ** Examples library(airGR) data(L0123001) str(BasinInfo)
/data/genthat_extracted_code/airGR/examples/BasinInfo.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
239
r
library(airGR) ### Name: BasinInfo ### Title: Data sample: characteristics of a fictional catchment (L0123001, ### L0123002 or L0123003) ### Aliases: BasinInfo ### ** Examples library(airGR) data(L0123001) str(BasinInfo)
##Lab 1: Subset Selection Methods #6.5.1 Best Subset Selection library(ISLR) fix(Hitters) names(Hitters) dim(Hitters) sum(is.na(Hitters$Salary)) Hitters<-na.omit(Hitters) dim(Hitters) sum(is.na(Hitters)) library(leaps) regfit.full<-regsubsets(Salary~.,Hitters) summary(regfit.full) regfit.full<-regsubsets(Salary~.,...
/Subset Selection Methods Lab 1 CH 6.R
no_license
data-engr/ISLR-labs
R
false
false
2,701
r
##Lab 1: Subset Selection Methods #6.5.1 Best Subset Selection library(ISLR) fix(Hitters) names(Hitters) dim(Hitters) sum(is.na(Hitters$Salary)) Hitters<-na.omit(Hitters) dim(Hitters) sum(is.na(Hitters)) library(leaps) regfit.full<-regsubsets(Salary~.,Hitters) summary(regfit.full) regfit.full<-regsubsets(Salary~.,...
library(ggplot2) # There are two Axis: # X axis: <- Robustness (brittle - robust) # Y axis: <- Difficulty (easy - hard) library(tibble) dat_prep <- tibble(prep = c(15,20,25,95, 96), understanding = c(15,20,95,95,96), label = c("Data Dump", "Most studie...
/figures/fig-robust-difficult-graph.R
no_license
KuldeepSJadon/ddd
R
false
false
969
r
library(ggplot2) # There are two Axis: # X axis: <- Robustness (brittle - robust) # Y axis: <- Difficulty (easy - hard) library(tibble) dat_prep <- tibble(prep = c(15,20,25,95, 96), understanding = c(15,20,95,95,96), label = c("Data Dump", "Most studie...
#Problem D1 MVrnorm <- function(n, mu, sigma) { ncols <- ncol(sigma) m <- rep(mu, each = n) m + matrix(rnorm(n * ncols), ncol = ncols) %*% chol(sigma) } sigma <- matrix(c(1, -0.2, 0.7, -0.2, 1, -0.1, 0.7, -0.1, 1), ncol = 3) mu <- c( 7, -12, 4) x <- mvrnorm(100000, mu, sigma) cor(x) colMeans(x) #compar...
/Ex1/multivariateDistr.R
no_license
poqw0912iuer/Statistical_methods
R
false
false
1,223
r
#Problem D1 MVrnorm <- function(n, mu, sigma) { ncols <- ncol(sigma) m <- rep(mu, each = n) m + matrix(rnorm(n * ncols), ncol = ncols) %*% chol(sigma) } sigma <- matrix(c(1, -0.2, 0.7, -0.2, 1, -0.1, 0.7, -0.1, 1), ncol = 3) mu <- c( 7, -12, 4) x <- mvrnorm(100000, mu, sigma) cor(x) colMeans(x) #compar...
# -------------------------------------- # # ANALYITQUE CONSULTORIA | julho/2020 # # Consultoria David Beltrao # # @georgiaribeiro # # -------------------------------------- # #- - - - Analise Dados UNComtrade - - - -# #Carregar pacote library(tidyverse) library(dplyr) library(pl...
/codigos/parte1/commercial_trade_analysis.R
no_license
davidbsta/consultoria_david
R
false
false
7,930
r
# -------------------------------------- # # ANALYITQUE CONSULTORIA | julho/2020 # # Consultoria David Beltrao # # @georgiaribeiro # # -------------------------------------- # #- - - - Analise Dados UNComtrade - - - -# #Carregar pacote library(tidyverse) library(dplyr) library(pl...
\name{findRMSEApower} \alias{findRMSEApower} \title{ Find the statistical power based on population RMSEA } \description{ Find the proportion of the samples from the sampling distribution of RMSEA in the alternative hypothesis rejected by the cutoff dervied from the sampling distribution of RMSEA in the null hypothesis...
/semTools/man/findRMSEApower.Rd
no_license
Alkonost/semTools
R
false
false
2,045
rd
\name{findRMSEApower} \alias{findRMSEApower} \title{ Find the statistical power based on population RMSEA } \description{ Find the proportion of the samples from the sampling distribution of RMSEA in the alternative hypothesis rejected by the cutoff dervied from the sampling distribution of RMSEA in the null hypothesis...
#' Make markdown documents for publications #' #' This function will create markdown documents in the Hugo Academic style for #' papers specified in an Excel spreadsheet, CSV file, or Google Sheet. #' #' @param data The file containing your data #' @param sheet_name Defines the sheet from which to read information on p...
/R/make_paper_md.R
permissive
mcguinlu/lazyacademic
R
false
false
4,021
r
#' Make markdown documents for publications #' #' This function will create markdown documents in the Hugo Academic style for #' papers specified in an Excel spreadsheet, CSV file, or Google Sheet. #' #' @param data The file containing your data #' @param sheet_name Defines the sheet from which to read information on p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kjco.R \name{kjco_materialCost_pick} \alias{kjco_materialCost_pick} \title{材料成本按生产领料单口径} \usage{ kjco_materialCost_pick(conn = conn_kjco(), FPeriod = "2020-03") } \arguments{ \item{conn}{连接} \item{FPeriod}{期间} } \value{ 返回值 } \description{ 材...
/man/kjco_materialCost_pick.Rd
no_license
takewiki/kjrdspkg
R
false
true
434
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kjco.R \name{kjco_materialCost_pick} \alias{kjco_materialCost_pick} \title{材料成本按生产领料单口径} \usage{ kjco_materialCost_pick(conn = conn_kjco(), FPeriod = "2020-03") } \arguments{ \item{conn}{连接} \item{FPeriod}{期间} } \value{ 返回值 } \description{ 材...
#' @title Fill missnig dimension info #' @description Estimate missing entries in dimension vector where possible #' @param x dimension string #' @param dimension.table Given mappings between document dimensions #' @param sheet.dimension.table Given mappings for sheet dimensions #' @return Augmented dimension vector #...
/R/fill_dimensions.R
no_license
digideskio/bibliographica
R
false
false
1,729
r
#' @title Fill missnig dimension info #' @description Estimate missing entries in dimension vector where possible #' @param x dimension string #' @param dimension.table Given mappings between document dimensions #' @param sheet.dimension.table Given mappings for sheet dimensions #' @return Augmented dimension vector #...
# Plot1.R # Exploratory Data Analysis: Project 1 # # Author: William Kennedy # Date: February 2015 ############################################################################## # Description: # Histogram of 'Global Active Power' # from 2007-02-01 to 2007-02-02 ####################################################...
/Plot1.R
no_license
wkennedy3125/ExData_Plotting1
R
false
false
1,914
r
# Plot1.R # Exploratory Data Analysis: Project 1 # # Author: William Kennedy # Date: February 2015 ############################################################################## # Description: # Histogram of 'Global Active Power' # from 2007-02-01 to 2007-02-02 ####################################################...
data<-data %>% mutate(quality=ifelse(quality<6,-1,1)) set.seed(0) test.idx<-sample(nrow(data),size =round(nrow(data)*0.3) ,replace = FALSE) test<-data[test.idx,] train<-data[-test.idx,] n<-nrow(train) weight<-rep(1/n,n) library("rpart") library("rpart.plot") models<-list() Alpham<-c() B<-100 for (i in 1:B) { s...
/doc/code.r
no_license
saiergong5243/GR5291-Wine-Quality-Analysis
R
false
false
1,545
r
data<-data %>% mutate(quality=ifelse(quality<6,-1,1)) set.seed(0) test.idx<-sample(nrow(data),size =round(nrow(data)*0.3) ,replace = FALSE) test<-data[test.idx,] train<-data[-test.idx,] n<-nrow(train) weight<-rep(1/n,n) library("rpart") library("rpart.plot") models<-list() Alpham<-c() B<-100 for (i in 1:B) { s...
Times2 = function(x) { return(x*2) }
/Problem 1/problem1.R
permissive
josiex/Coding-Problems
R
false
false
41
r
Times2 = function(x) { return(x*2) }
context("testing R2 functions") # data set.seed(123456) p1 <- 10; nsample <- 20; n <- p1 * nsample d <- data.frame(x1 = rnorm(n = n), x2 = rnorm(n = n), u1 = rep(1:p1, each = nsample), u2 = rep(1:p1, times = nsample)) d$u1 <- as.factor(d$u1); d$u2 <- as.factor(d$u2) ...
/rr2-master/tests/testthat/test_r2s.R
no_license
liushengyong/lab
R
false
false
5,380
r
context("testing R2 functions") # data set.seed(123456) p1 <- 10; nsample <- 20; n <- p1 * nsample d <- data.frame(x1 = rnorm(n = n), x2 = rnorm(n = n), u1 = rep(1:p1, each = nsample), u2 = rep(1:p1, times = nsample)) d$u1 <- as.factor(d$u1); d$u2 <- as.factor(d$u2) ...
rm(list=ls()) demo <- FALSE # if testing code, set as TRUE; if running simulations, set as FALSE if(demo){ # local setwd("~/Documents/ComBat_seq/DE_analysis_tmp/") script_dir <- "~/Dropbox/Work/ComBat_Seq/ComBat-Seq" source(file.path(script_dir, "simulations/sim_DEpipe_helpers.R")) }else{ # running on server ...
/simulations/sim_DEpipe_compFDR_EBcomplete.R
no_license
lovivi/ComBat-seq
R
false
false
11,847
r
rm(list=ls()) demo <- FALSE # if testing code, set as TRUE; if running simulations, set as FALSE if(demo){ # local setwd("~/Documents/ComBat_seq/DE_analysis_tmp/") script_dir <- "~/Dropbox/Work/ComBat_Seq/ComBat-Seq" source(file.path(script_dir, "simulations/sim_DEpipe_helpers.R")) }else{ # running on server ...
rm(list = ls()) x <- 5 y <- 10 z <- 1:5 seq(1 , 10 , by = 2, length = 3) seq(along.with = 1:10,4,1) rep(c(1,2,3), 3) rep(c(1,2,3), times = 3) rep(c(1,2,3), times = 3, length.out = 5) rep(c(1,2,3), each = 3) rep(c(1,2,3), each = 3, length.out = 5) # rep, seq를 한번에 사용하는 문 # 예제문제 #1. 1~100까지 짝수를 2번씩 출력(2 2 4 4 6 6 .......
/R/R 기초/week1_복습.R
no_license
changyong93/nanodegree
R
false
false
7,856
r
rm(list = ls()) x <- 5 y <- 10 z <- 1:5 seq(1 , 10 , by = 2, length = 3) seq(along.with = 1:10,4,1) rep(c(1,2,3), 3) rep(c(1,2,3), times = 3) rep(c(1,2,3), times = 3, length.out = 5) rep(c(1,2,3), each = 3) rep(c(1,2,3), each = 3, length.out = 5) # rep, seq를 한번에 사용하는 문 # 예제문제 #1. 1~100까지 짝수를 2번씩 출력(2 2 4 4 6 6 .......
\name{NEWS} \title{News for Package \pkg{RIVERpkg}} \section{Changes in version 0.99.1 (2017-02-01)}{ \itemize{ \item Revise evaRIVER.R and add simulated_N2pairs.RData into the package to obtain feature-invariant N2 pairs \item Revise an evaluation approach for fully evaluating models \item Incorporate E...
/inst/NEWS.Rd
no_license
lcolladotor/RIVERpkg
R
false
false
638
rd
\name{NEWS} \title{News for Package \pkg{RIVERpkg}} \section{Changes in version 0.99.1 (2017-02-01)}{ \itemize{ \item Revise evaRIVER.R and add simulated_N2pairs.RData into the package to obtain feature-invariant N2 pairs \item Revise an evaluation approach for fully evaluating models \item Incorporate E...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.42112686000532e-303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615829571-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
361
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.42112686000532e-303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wykresKolowyZlicz.R \name{wykresKolowyZlicz} \alias{wykresKolowyZlicz} \title{Wykres kołowy ze zliczenia wartości zmiennej} \usage{ wykresKolowyZlicz(dane, etykiety = NULL, tytul = "", rozmiarTekstu = NULL, opcjeWykresu = NULL, rysuj = TRUE...
/man/wykresKolowyZlicz.Rd
permissive
borun84/MLAK
R
false
true
1,550
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wykresKolowyZlicz.R \name{wykresKolowyZlicz} \alias{wykresKolowyZlicz} \title{Wykres kołowy ze zliczenia wartości zmiennej} \usage{ wykresKolowyZlicz(dane, etykiety = NULL, tytul = "", rozmiarTekstu = NULL, opcjeWykresu = NULL, rysuj = TRUE...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ubiquity.R \name{system_fetch_set} \alias{system_fetch_set} \title{Fetch Mathematical Set} \usage{ system_fetch_set(cfg, set_name = NULL) } \arguments{ \item{cfg}{ubiquity system object} \item{set_name}{name of mathematical set} } \value{ A ...
/man/system_fetch_set.Rd
permissive
john-harrold/ubiquity
R
false
true
1,074
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ubiquity.R \name{system_fetch_set} \alias{system_fetch_set} \title{Fetch Mathematical Set} \usage{ system_fetch_set(cfg, set_name = NULL) } \arguments{ \item{cfg}{ubiquity system object} \item{set_name}{name of mathematical set} } \value{ A ...
#' \code{geobr} package #' #' Easy access to shapefiles of the Brazilian Institute of Geography and Statistics (IBGE) and other official spatial data sets of Brazil #' #' See the README on #\href{https://cran.r-project.org/package=geobr/README.html}{CRAN} #' \href{https://github.com/ipeaGIT/geobr#readme}{GitHub} #' #' ...
/r-package/R/geobr.R
no_license
bmpacifique/geobr
R
false
false
1,741
r
#' \code{geobr} package #' #' Easy access to shapefiles of the Brazilian Institute of Geography and Statistics (IBGE) and other official spatial data sets of Brazil #' #' See the README on #\href{https://cran.r-project.org/package=geobr/README.html}{CRAN} #' \href{https://github.com/ipeaGIT/geobr#readme}{GitHub} #' #' ...
library(MASS) data(Aids2) NROW(Aids2) NCOL(Aids2) A <- data.frame(Aids2) head(A) # Data on patients diagnosed with AIDS in Australia before 1 July 1991 # state Grouped state of origin: "NSW "includes ACT and "other" is WA, SA, NT and TAS. # sex Sex of patient. # diag (Julian) date of diagnosis. # death (Julian) date o...
/Project3.R
no_license
mt42190n/Mary-Data-Acq
R
false
false
1,705
r
library(MASS) data(Aids2) NROW(Aids2) NCOL(Aids2) A <- data.frame(Aids2) head(A) # Data on patients diagnosed with AIDS in Australia before 1 July 1991 # state Grouped state of origin: "NSW "includes ACT and "other" is WA, SA, NT and TAS. # sex Sex of patient. # diag (Julian) date of diagnosis. # death (Julian) date o...
#This is a script to compile all of the kallisto expression data for the various tissues #First let's read in the individual results files and give them useful names Leaf <- read.csv("~/Downloads/TGACCA abundance.tsv", header=TRUE, sep="") Inflor <- read.csv("~/Downloads/ACAGTG abundance.tsv", header=TRUE, sep="") Fru...
/KallistoSummary.R
no_license
rajewski/FULAnalysis
R
false
false
1,344
r
#This is a script to compile all of the kallisto expression data for the various tissues #First let's read in the individual results files and give them useful names Leaf <- read.csv("~/Downloads/TGACCA abundance.tsv", header=TRUE, sep="") Inflor <- read.csv("~/Downloads/ACAGTG abundance.tsv", header=TRUE, sep="") Fru...
oxford = function(nchain, data, init, prop.sd){ ## Initialisation grace aux donnees N = dim(data)[1] r1 = data$r1 n1 = data$n1 r0 = data$r0 n0 = data$n0 year = data$year ## Calculs une bonne fois pour toute dim = length(init) ## Creation de la chaine et ...
/Code_R_Oxford.R
no_license
NonaryAce/School_Project_DAVID_BARLIER_GUILLEMOT_MORVAN
R
false
false
5,785
r
oxford = function(nchain, data, init, prop.sd){ ## Initialisation grace aux donnees N = dim(data)[1] r1 = data$r1 n1 = data$n1 r0 = data$r0 n0 = data$n0 year = data$year ## Calculs une bonne fois pour toute dim = length(init) ## Creation de la chaine et ...
#####le premier modele de garch(2,1) library(fGarch) spec=garchSpec(model=list(mu=2,omega=.09,alph=c(.15,.3),beta=.4),rseed=9647) y=garchSim(spec,n=400,extended=TRUE) y1=y[1:400,1] plot.ts(y1,xlab="temps") ############################################### # simuler GARCH(1,1) # specifier le modèle GARCH(1,1) garch11...
/autres_scripts/sim-garch.R
no_license
HafsaaOuifak/ARCH-GARCH-models-Forecasting-
R
false
false
1,170
r
#####le premier modele de garch(2,1) library(fGarch) spec=garchSpec(model=list(mu=2,omega=.09,alph=c(.15,.3),beta=.4),rseed=9647) y=garchSim(spec,n=400,extended=TRUE) y1=y[1:400,1] plot.ts(y1,xlab="temps") ############################################### # simuler GARCH(1,1) # specifier le modèle GARCH(1,1) garch11...
#' Add a model to a workflow #' #' @description #' - `add_model()` adds a parsnip model to the workflow. #' #' - `remove_model()` removes the model specification as well as any fitted #' model object. Any extra formulas are also removed. #' #' - `update_model()` first removes the model then adds the new specification...
/R/fit-action-model.R
permissive
minghao2016/workflows
R
false
false
3,584
r
#' Add a model to a workflow #' #' @description #' - `add_model()` adds a parsnip model to the workflow. #' #' - `remove_model()` removes the model specification as well as any fitted #' model object. Any extra formulas are also removed. #' #' - `update_model()` first removes the model then adds the new specification...
# --------- # 25-2 轉utf-8 # --------- # ---------------------------------------------------------- # indicators <- c("BX.KLT.DINV.WD.GD.ZS", "NY.GDP.DEFL.KD.ZG", "NY.GDP.MKTP.CD", "NY.GDP.MKTP.KD.ZG", "NY.GDP.PCAP.CD", "NY.GDP.PCAP.KD.ZG", "TG.VAL.TOTL.GD.ZS") library(...
/t3.R
no_license
ShangWeiKuo/R-test
R
false
false
4,019
r
# --------- # 25-2 轉utf-8 # --------- # ---------------------------------------------------------- # indicators <- c("BX.KLT.DINV.WD.GD.ZS", "NY.GDP.DEFL.KD.ZG", "NY.GDP.MKTP.CD", "NY.GDP.MKTP.KD.ZG", "NY.GDP.PCAP.CD", "NY.GDP.PCAP.KD.ZG", "TG.VAL.TOTL.GD.ZS") library(...
#' Generalized Newton move with dimension changes for the copula model. #' #' @param MCMC.propArgs "list". #' @param Mdl.varSelArgs "list". #' @param Mdl.priArgs "list". #' @param betaIdxProp "list". #' @param parUpdate "list". #' @param CplNM "list". #' @param Mdl.Y "list". #' @param Mdl.X "list". #' @param Mdl.beta "...
/R/mcmc__PropGNewtonMove.R
no_license
ayotoasset/cdcopula
R
false
false
13,074
r
#' Generalized Newton move with dimension changes for the copula model. #' #' @param MCMC.propArgs "list". #' @param Mdl.varSelArgs "list". #' @param Mdl.priArgs "list". #' @param betaIdxProp "list". #' @param parUpdate "list". #' @param CplNM "list". #' @param Mdl.Y "list". #' @param Mdl.X "list". #' @param Mdl.beta "...
library(janitor) library(dplyr) df <- mtcars head(df) clean <- clean_names(df) colnames(clean) # count the numbers and write their percentage allocation in the dataset ddf <- clean %>% tabyl(vs) # count the numbers and view them as a percentage value with percentange sign clean %>% tabyl(vs) %>% ...
/janitor/janitor.R
no_license
Dpakkk/R-manipulation
R
false
false
377
r
library(janitor) library(dplyr) df <- mtcars head(df) clean <- clean_names(df) colnames(clean) # count the numbers and write their percentage allocation in the dataset ddf <- clean %>% tabyl(vs) # count the numbers and view them as a percentage value with percentange sign clean %>% tabyl(vs) %>% ...
# This script generates a histogram of the variable Global_active_power # (taken from the household_power_consumption.txt dataset # in the range 1/2/2007-2/2/2007). # the resulting graph is saved to a png image file x<-read.table("household_power_consumption.txt") y<-subset(x,Date=="1/2/2007" | Date=="2/2/2007") png("...
/plot1.R
no_license
George--V/ExData_Plotting1
R
false
false
514
r
# This script generates a histogram of the variable Global_active_power # (taken from the household_power_consumption.txt dataset # in the range 1/2/2007-2/2/2007). # the resulting graph is saved to a png image file x<-read.table("household_power_consumption.txt") y<-subset(x,Date=="1/2/2007" | Date=="2/2/2007") png("...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 72454 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 72453 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 72453 c c Input Parameter (command line, ...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Sauer-Reimer/ITC99/b17_PR_7_20/b17_PR_7_20.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
719
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 72454 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 72453 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 72453 c c Input Parameter (command line, ...
/code/Rscripts/ACEmodeling/ACEmodel.R
no_license
ShaohanJiang/originsMetacognition
R
false
false
4,734
r
#' El objetivo de este documento es probar una red bayesiana para realizar predicción sobre los datos de sensores. #' Para ello aprendemos una red bayesiana y ajustamos sus parámetros, considerando los datos de entrada como continuos #' (no realizamos discretización), por eso veremos que se samplean la distribución d...
/tutorials-or-first-tries/dacc-preProcess.R
permissive
anadiedrichs/diedrichs2017prediction-frost-experiments
R
false
false
9,431
r
#' El objetivo de este documento es probar una red bayesiana para realizar predicción sobre los datos de sensores. #' Para ello aprendemos una red bayesiana y ajustamos sus parámetros, considerando los datos de entrada como continuos #' (no realizamos discretización), por eso veremos que se samplean la distribución d...
setwd("~/Documents/R/Otto/data") require(foreign) require(nnet) require(ggplot2) require(reshape2) ## Read data #### prod <- read.table("train.csv", header = TRUE, sep = ",") test <- read.table("test.csv", header = TRUE, sep = ",") #feat_11 feat_60 feat_27 feat_34 feat_3 feat_46 feat_90 feat_61 feat_80 feat_14 feat_...
/RProjects/Otto/OttoMLR.R
no_license
sunla/MLearn
R
false
false
1,030
r
setwd("~/Documents/R/Otto/data") require(foreign) require(nnet) require(ggplot2) require(reshape2) ## Read data #### prod <- read.table("train.csv", header = TRUE, sep = ",") test <- read.table("test.csv", header = TRUE, sep = ",") #feat_11 feat_60 feat_27 feat_34 feat_3 feat_46 feat_90 feat_61 feat_80 feat_14 feat_...
library(pbkrtest) ### Name: get_ddf_Lb ### Title: Adjusted denomintor degress freedom for linear estimate for ### linear mixed model. ### Aliases: Lb_ddf ddf_Lb get_Lb_ddf get_Lb_ddf.lmerMod get_ddf_Lb ### get_ddf_Lb.lmerMod ### Keywords: inference models ### ** Examples (fmLarge <- lmer(Reaction ~ Days + (Day...
/data/genthat_extracted_code/pbkrtest/examples/get_ddf_Lb.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
691
r
library(pbkrtest) ### Name: get_ddf_Lb ### Title: Adjusted denomintor degress freedom for linear estimate for ### linear mixed model. ### Aliases: Lb_ddf ddf_Lb get_Lb_ddf get_Lb_ddf.lmerMod get_ddf_Lb ### get_ddf_Lb.lmerMod ### Keywords: inference models ### ** Examples (fmLarge <- lmer(Reaction ~ Days + (Day...
## Taken from http://lingpipe-blog.com/2009/06/25/log-sum-of-exponentials/ ## Imagine you want to compute z = log(sum(exp(x_i))) ## This may give you an overflow for x_i big enough ## See the link for the derivation of this stabilised version naiveLogSumExp <- function(x){ z <- log(sum(exp(x))) return(z) } stabLog...
/R/MATHS/logSumExp.r
no_license
Brandon-Stark/CODE
R
false
false
583
r
## Taken from http://lingpipe-blog.com/2009/06/25/log-sum-of-exponentials/ ## Imagine you want to compute z = log(sum(exp(x_i))) ## This may give you an overflow for x_i big enough ## See the link for the derivation of this stabilised version naiveLogSumExp <- function(x){ z <- log(sum(exp(x))) return(z) } stabLog...
#Libraries library(survival) library(ggplot2) library(dplyr) library(ggfortify) library(autoplot) library(survminer) library(magrittr) library(kableExtra) library(finalfit) library(gt) library(gtsummary) library(coxphw)
/IPD Brahmer et al. 2016 Fig 1.A Crossing Hazards/Data/Libraries.R
no_license
Programming-Skills/MA50262-Code
R
false
false
220
r
#Libraries library(survival) library(ggplot2) library(dplyr) library(ggfortify) library(autoplot) library(survminer) library(magrittr) library(kableExtra) library(finalfit) library(gt) library(gtsummary) library(coxphw)
## This function computes the inverse of the special "matrix" ## returned by makeCacheMatrix above. If the inverse has already ## been calculated (and the matrix has not changed), then the ## cachesolve will retrieve the inverse from the cache. makeCacheMatrix <- function(x = matrix()) { inv <- NULL ...
/cachematrix.R
no_license
riyaj9993/ProgrammingAssignment2
R
false
false
905
r
## This function computes the inverse of the special "matrix" ## returned by makeCacheMatrix above. If the inverse has already ## been calculated (and the matrix has not changed), then the ## cachesolve will retrieve the inverse from the cache. makeCacheMatrix <- function(x = matrix()) { inv <- NULL ...
attach(mtcars) mtcars auto=mpg[am==0] manual=mpg[am==1] n1=length(auto) n2=length(manual) s1=sd(auto) s2=sd(manual) x1=mean(auto);x1 x2=mean(manual);x2 sp=sqrt(((n1-1)*s1^2+(n2-1)*s2^2)/(n1+n2-2));sp t=(x1-x2)/(sp*sqrt((1/n1)+(1/n2)));t pval=2*pt(t,df=n1+n2-2);pval
/testing-theDifference-between-2Independent-population_means.R
no_license
pasindusiriwardana95/R-language
R
false
false
271
r
attach(mtcars) mtcars auto=mpg[am==0] manual=mpg[am==1] n1=length(auto) n2=length(manual) s1=sd(auto) s2=sd(manual) x1=mean(auto);x1 x2=mean(manual);x2 sp=sqrt(((n1-1)*s1^2+(n2-1)*s2^2)/(n1+n2-2));sp t=(x1-x2)/(sp*sqrt((1/n1)+(1/n2)));t pval=2*pt(t,df=n1+n2-2);pval