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
iChao <- function(){ version <- "V 1.1" #1.1 7/24/19: added in basic maths. for some reason it keeps borking a little, so that's to be dealt with. #TO DO: #unbork math #loop everything #let user pick "master task" for fpl and shit #1.0 7/23/19: added primal test to prevent breaking. ...
/iChao.R
no_license
pickletime/werq
R
false
false
4,509
r
iChao <- function(){ version <- "V 1.1" #1.1 7/24/19: added in basic maths. for some reason it keeps borking a little, so that's to be dealt with. #TO DO: #unbork math #loop everything #let user pick "master task" for fpl and shit #1.0 7/23/19: added primal test to prevent breaking. ...
d <- readData(scale=F) ps <- vector() ts <- vector() # i = 974 # i = 492 # i = 1916 for (i in 1:dim(d)[1]) { t <- t.test(d[i,1:11],d[i,12:20]) ps[i] <- t$p.value ts[i] <- t$statistic } hist(ts,30,prob=T) hist(ps,30,prob=T) df.p <- data.frame(p=ps,ix = 1:dim(d)[1]) head(df.p) tail(df.p) order.p <- order(ps) df....
/sweetman/rscripts/old/ttests.R
no_license
OldMortality/shinies2
R
false
false
851
r
d <- readData(scale=F) ps <- vector() ts <- vector() # i = 974 # i = 492 # i = 1916 for (i in 1:dim(d)[1]) { t <- t.test(d[i,1:11],d[i,12:20]) ps[i] <- t$p.value ts[i] <- t$statistic } hist(ts,30,prob=T) hist(ps,30,prob=T) df.p <- data.frame(p=ps,ix = 1:dim(d)[1]) head(df.p) tail(df.p) order.p <- order(ps) df....
library(pracma) library("rgdal") library("readxl") source("Utilities.R") landPriceTable <- read.csv(file = "ie_c2vsim_landuse_saleprice.csv") ca_cdl_xwalk <- read_excel(path = "ca_cdl_xwalk.xlsx", sheet = 1, range = "A1:C102",col_names = T) # get unique descriptions of land uses lu_descr <- levels(factor(landPriceTable...
/Rwrkspc/EconomicObjFnc.R
no_license
UCD-GW-Nitrate/C2VsimCG
R
false
false
4,832
r
library(pracma) library("rgdal") library("readxl") source("Utilities.R") landPriceTable <- read.csv(file = "ie_c2vsim_landuse_saleprice.csv") ca_cdl_xwalk <- read_excel(path = "ca_cdl_xwalk.xlsx", sheet = 1, range = "A1:C102",col_names = T) # get unique descriptions of land uses lu_descr <- levels(factor(landPriceTable...
load('chr_half_df.Rdata') # this file in on google drive under 350_data chr_half_df$orig_prop_single.a = chr_half_df$orig_prop_single.a / chr_half_df$leng chr_half_df$orig_prop_single.c = chr_half_df$orig_prop_single.c / chr_half_df$leng chr_half_df$orig_prop_single.g = chr_half_df$orig_prop_single.g / chr_half_df$le...
/analyze_2.R
no_license
kairavichahal/Markov-Chain-Genetic-Models
R
false
false
6,040
r
load('chr_half_df.Rdata') # this file in on google drive under 350_data chr_half_df$orig_prop_single.a = chr_half_df$orig_prop_single.a / chr_half_df$leng chr_half_df$orig_prop_single.c = chr_half_df$orig_prop_single.c / chr_half_df$leng chr_half_df$orig_prop_single.g = chr_half_df$orig_prop_single.g / chr_half_df$le...
###### Funções do Caio Referente à MANOVA ######## #Funções Gerais ######## Box.teste.Igual.MCov<-function(m.X.completa,v.grupos,v.n,G) { # v.grupos (1,2,3...) # m.X.completa : matriz de dados com todos os grupos grupo <- 1 p<- ncol(m.X.completa) m.X.k <- m.X.completa[v.grupos==grupo,] Sigma.k <- cov(m.X....
/TRABALHO/PARTE 1/Questao1/codigoscaioMANOVA.R
no_license
GuilhermePazian/ME731
R
false
false
5,126
r
###### Funções do Caio Referente à MANOVA ######## #Funções Gerais ######## Box.teste.Igual.MCov<-function(m.X.completa,v.grupos,v.n,G) { # v.grupos (1,2,3...) # m.X.completa : matriz de dados com todos os grupos grupo <- 1 p<- ncol(m.X.completa) m.X.k <- m.X.completa[v.grupos==grupo,] Sigma.k <- cov(m.X....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build_demographics_householdStatus_2010.R \name{build_demographics_householdStatus_2010} \alias{build_demographics_householdStatus_2010} \title{Builds household dweller status for 2010} \usage{ build_demographics_householdStatus_2010(CensusDa...
/man/build_demographics_householdStatus_2010.Rd
no_license
antrologos/harmonizeIBGE
R
false
true
383
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build_demographics_householdStatus_2010.R \name{build_demographics_householdStatus_2010} \alias{build_demographics_householdStatus_2010} \title{Builds household dweller status for 2010} \usage{ build_demographics_householdStatus_2010(CensusDa...
#' Historical data used for classification examples. #' #' The dataset considered here, available in the raw_data/radon.csv file, contains data for 919 homes in the 85 counties of Minnesota. Radon comes from underground and can enter more easily when home is built into ground. So, one potentially useful predictor of th...
/R/data-radon_mn.R
no_license
d3m-purdue/d3mLm
R
false
false
676
r
#' Historical data used for classification examples. #' #' The dataset considered here, available in the raw_data/radon.csv file, contains data for 919 homes in the 85 counties of Minnesota. Radon comes from underground and can enter more easily when home is built into ground. So, one potentially useful predictor of th...
#Read file into R firstplot <- read.csv("c:/rWork/Household_Power.csv", header=TRUE, stringsAsFactors = FALSE) #Create the plot plot1 <- hist(firstplot$Global_active_power, xlab="Global Active Power (killowatts)", main="Global Active Power", col="red") #Copy the plot to...
/plot1.R
no_license
datatooinfo/EDA
R
false
false
400
r
#Read file into R firstplot <- read.csv("c:/rWork/Household_Power.csv", header=TRUE, stringsAsFactors = FALSE) #Create the plot plot1 <- hist(firstplot$Global_active_power, xlab="Global Active Power (killowatts)", main="Global Active Power", col="red") #Copy the plot to...
#------------------------------------------------------------- # Gradient for transformed std dev in the spatial coupled HMM # framework with AR(1) state-dependent distributions #------------------------------------------------------------- stddev_gradient <- function(y, lagy, eta, mu, rho){ gradient <- -...
/Gradients/StdDev_Gradient.R
no_license
vianeylb/SpatialCoupledHMMs
R
false
false
404
r
#------------------------------------------------------------- # Gradient for transformed std dev in the spatial coupled HMM # framework with AR(1) state-dependent distributions #------------------------------------------------------------- stddev_gradient <- function(y, lagy, eta, mu, rho){ gradient <- -...
\name{mcmc_parnames_pattern} \alias{mcmc_parname_pattern} \alias{mcmc_parnames_bugs} \alias{mcmc_parnames_pattern} \alias{mcmc_parnames_stan} \alias{mcmc_parnames_underscore} \title{Create paramter names for flattened parameters} \usage{ mcmc_parnames_pattern(x, d, pre = ".", sep = ".", post = "", colmajor = TRUE...
/man/mcmc_parnames.Rd
no_license
jrnold/mcmcdb
R
false
false
1,711
rd
\name{mcmc_parnames_pattern} \alias{mcmc_parname_pattern} \alias{mcmc_parnames_bugs} \alias{mcmc_parnames_pattern} \alias{mcmc_parnames_stan} \alias{mcmc_parnames_underscore} \title{Create paramter names for flattened parameters} \usage{ mcmc_parnames_pattern(x, d, pre = ".", sep = ".", post = "", colmajor = TRUE...
library(shiny) library(shinythemes) library(shinyjs) shinyUI(fluidPage(theme = shinytheme("superhero"), titlePanel("Word and Emoji Prediction"), shinyjs::useShinyjs(), navbarPage("Data Science Project", tabPanel("Prediction", p("1. Write in the text input box be...
/ui.R
no_license
hbcavalheri/Word-and-Emoji-Prediction
R
false
false
4,215
r
library(shiny) library(shinythemes) library(shinyjs) shinyUI(fluidPage(theme = shinytheme("superhero"), titlePanel("Word and Emoji Prediction"), shinyjs::useShinyjs(), navbarPage("Data Science Project", tabPanel("Prediction", p("1. Write in the text input box be...
## Read xml data # Sample file for now library(tidyverse) library(here) library(xml2) library(XML) library(lubridate) #setwd("~/Documents/Projects/U19/IRS/673objects") # setwd("/Volumes/veloce2_f/U19/DATA/IRS990/673objects") # irs_files = list.files(file.path(here::here(), "IRS990/673objects")) # Get list of xml filen...
/Healthcare/IRS 990/read_irs.R
permissive
MokeEire/PolicyWork
R
false
false
13,467
r
## Read xml data # Sample file for now library(tidyverse) library(here) library(xml2) library(XML) library(lubridate) #setwd("~/Documents/Projects/U19/IRS/673objects") # setwd("/Volumes/veloce2_f/U19/DATA/IRS990/673objects") # irs_files = list.files(file.path(here::here(), "IRS990/673objects")) # Get list of xml filen...
if(VOR == "Standard"){ qbReplacements <- 13 rbReplacements <- 35 wrReplacements <- 36 teReplacements <- 10 kReplacements <- 8 dstReplacements <- 3 } #### Add how many players are drafted within the first 100 picks in your league. if(VOR == "Custom"){ qbReplacements <- 10 rbReplacements <- 36 wrReplacements <- 37 teRepl...
/Value Over Replacement Settings.R
no_license
quinnpertuit/Fantasy_Football_Projections
R
false
false
376
r
if(VOR == "Standard"){ qbReplacements <- 13 rbReplacements <- 35 wrReplacements <- 36 teReplacements <- 10 kReplacements <- 8 dstReplacements <- 3 } #### Add how many players are drafted within the first 100 picks in your league. if(VOR == "Custom"){ qbReplacements <- 10 rbReplacements <- 36 wrReplacements <- 37 teRepl...
setwd("C:/Users/sprot/Dropbox (School of Management)/UCD/442_stats/Class 3") library(tidyverse) library(numDeriv) library(GenSA) library(nlstools) library(nls2) library(corrplot) library(plotly) data=read.csv("class_data.csv", header=T) # read csv file and label the data as "data" corrplot(cor(data[,-1]), method ...
/final_results2 - Copy.R
no_license
sprotou/various
R
false
false
5,045
r
setwd("C:/Users/sprot/Dropbox (School of Management)/UCD/442_stats/Class 3") library(tidyverse) library(numDeriv) library(GenSA) library(nlstools) library(nls2) library(corrplot) library(plotly) data=read.csv("class_data.csv", header=T) # read csv file and label the data as "data" corrplot(cor(data[,-1]), method ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sampledata.R \docType{data} \name{SPI.12} \alias{SPI.12} \title{Sample data: Standardized Precipitation Index with 12 month accumulation period.} \usage{ data(SPI.12) } \description{ A dataset containing 1200 rows (data length) and 252 column...
/man/SPI.12.Rd
no_license
Allisterh/WASP
R
false
true
344
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sampledata.R \docType{data} \name{SPI.12} \alias{SPI.12} \title{Sample data: Standardized Precipitation Index with 12 month accumulation period.} \usage{ data(SPI.12) } \description{ A dataset containing 1200 rows (data length) and 252 column...
# Package extra action registry # # Author: renaud ############################################################################### #' @include devutils.R NULL .getExtraEnv <- function(package){ if( missing(package) || is.null(package) ) where <- topns(FALSE) else if( isString(package) ) { package <- sub("^packa...
/pkgmaker/R/package-extra.R
no_license
ingted/R-Examples
R
false
false
8,279
r
# Package extra action registry # # Author: renaud ############################################################################### #' @include devutils.R NULL .getExtraEnv <- function(package){ if( missing(package) || is.null(package) ) where <- topns(FALSE) else if( isString(package) ) { package <- sub("^packa...
library(tidyverse) library(tidyxl) library(unpivotr) cells <- xlsx_cells("./structure-june-eng-localauthority-09jan18.xlsx") %>% dplyr::filter(!is_blank, row >= 2L) formats <- xlsx_formats("./structure-june-eng-localauthority-09jan18.xlsx") bold <- formats$local$font$bold land_livestock <- cells %>% dplyr::f...
/structure-june-eng-localauthority-09jan18/structure-june-eng-localauthority-09jan18.R
no_license
bedantaguru/ukfarm
R
false
false
1,843
r
library(tidyverse) library(tidyxl) library(unpivotr) cells <- xlsx_cells("./structure-june-eng-localauthority-09jan18.xlsx") %>% dplyr::filter(!is_blank, row >= 2L) formats <- xlsx_formats("./structure-june-eng-localauthority-09jan18.xlsx") bold <- formats$local$font$bold land_livestock <- cells %>% dplyr::f...
##----------class8:基因突变数据可视化-------------## rm(list = ls()) # 安装 if (!requireNamespace("BiocManager", quietly = TRUE)){ install.packages("BiocManager") } #BiocManager::install("ComplexHeatmap") library("ComplexHeatmap") library(circlize) setwd('D:/R/R_learn/2020/') #突变信息 mutation <- './bioinformation_start/Bioinforma...
/Bioinformatics_research_analysis/class8_oncoprint_gene_mutation.R
no_license
mojianranzys/2020_new_start
R
false
false
4,050
r
##----------class8:基因突变数据可视化-------------## rm(list = ls()) # 安装 if (!requireNamespace("BiocManager", quietly = TRUE)){ install.packages("BiocManager") } #BiocManager::install("ComplexHeatmap") library("ComplexHeatmap") library(circlize) setwd('D:/R/R_learn/2020/') #突变信息 mutation <- './bioinformation_start/Bioinforma...
library(foreign) library(ggplot2) library(lattice) library(quantreg) library(lmtest) library(car) setwd ("C:/Econometrics Applications") loandata <- read.dta ("loanapp5.dta") olsreg <- lm(approve~ white, data=loandata) summary(olsreg) coef(olsreg) c(1,1)%*%olsreg$coef c(1,0)%*%olsreg$coef by(loandata...
/QuantileRegression.R
no_license
https-seyhan/Econometrics
R
false
false
1,293
r
library(foreign) library(ggplot2) library(lattice) library(quantreg) library(lmtest) library(car) setwd ("C:/Econometrics Applications") loandata <- read.dta ("loanapp5.dta") olsreg <- lm(approve~ white, data=loandata) summary(olsreg) coef(olsreg) c(1,1)%*%olsreg$coef c(1,0)%*%olsreg$coef by(loandata...
library("FSelector") data("iris") iris weidhts <- relief(Species~.,iris,neighbours.count = 5, sample.size = 20) subset <- cutoff.k(weidhts, 2) f <- as.simple.formula(subset, "Species")
/prova.R
no_license
federicovagnoni/MOBD-R
R
false
false
193
r
library("FSelector") data("iris") iris weidhts <- relief(Species~.,iris,neighbours.count = 5, sample.size = 20) subset <- cutoff.k(weidhts, 2) f <- as.simple.formula(subset, "Species")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/route53_operations.R \name{route53_create_hosted_zone} \alias{route53_create_hosted_zone} \title{Creates a new public or private hosted zone} \usage{ route53_create_hosted_zone( Name, VPC = NULL, CallerReference, HostedZoneConfig = NU...
/man/route53_create_hosted_zone.Rd
no_license
cran/paws.networking
R
false
true
3,333
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/route53_operations.R \name{route53_create_hosted_zone} \alias{route53_create_hosted_zone} \title{Creates a new public or private hosted zone} \usage{ route53_create_hosted_zone( Name, VPC = NULL, CallerReference, HostedZoneConfig = NU...
## These functions cache the inverse of a matrix. ## makeCacheMatrix creates a special "matrix" object that can ## cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x ...
/cachematrix.R
no_license
dsarro/ProgrammingAssignment2
R
false
false
1,046
r
## These functions cache the inverse of a matrix. ## makeCacheMatrix creates a special "matrix" object that can ## cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x ...
library(mbir) ### Name: prop ### Title: Test of Two Proportions ### Aliases: prop ### ** Examples prop(p1 = 0.7, n1 = 25, p2 = 0.5, n2 = 20)
/data/genthat_extracted_code/mbir/examples/prop.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
148
r
library(mbir) ### Name: prop ### Title: Test of Two Proportions ### Aliases: prop ### ** Examples prop(p1 = 0.7, n1 = 25, p2 = 0.5, n2 = 20)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/check_event_cols.R \name{check_events_col} \alias{check_events_col} \title{check the events columns} \usage{ check_events_col(.df, .var) } \arguments{ \item{.df}{a dataframe.} \item{.var}{the name of the column to test.} } \value{ the functi...
/man/check_events_col.Rd
no_license
marcogaudio/monitr.docs
R
false
true
524
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/check_event_cols.R \name{check_events_col} \alias{check_events_col} \title{check the events columns} \usage{ check_events_col(.df, .var) } \arguments{ \item{.df}{a dataframe.} \item{.var}{the name of the column to test.} } \value{ the functi...
#' House sparrow survival data. #' #' Measurements of samples of house sparrows (Passer domesticus) brought to the Anatomical Laboratory at Brown University after a severe storm. They were published by Bumpus (1898) who used the data to illustrate natural selection. #' #' @format A data frame of 136 observations ...
/R/bumpus.R
no_license
trobinj/trtools
R
false
false
1,612
r
#' House sparrow survival data. #' #' Measurements of samples of house sparrows (Passer domesticus) brought to the Anatomical Laboratory at Brown University after a severe storm. They were published by Bumpus (1898) who used the data to illustrate natural selection. #' #' @format A data frame of 136 observations ...
# function to plot observed XCO2 on map, DW # add section to plot observed XCO2 with quality flag on latitude series, 07/03/2018 # use grab.oco() to read observations, DW, 08/07/2018 # update for v9 lite data, QF filtering controled by qfTF, DW, 10/19/2018 # skip the overpass, if data is not enough, DW, 04/21/2019 # ...
/r/src/plotting/ggmap.obs.xco2.r
no_license
uataq/X-STILT
R
false
false
4,567
r
# function to plot observed XCO2 on map, DW # add section to plot observed XCO2 with quality flag on latitude series, 07/03/2018 # use grab.oco() to read observations, DW, 08/07/2018 # update for v9 lite data, QF filtering controled by qfTF, DW, 10/19/2018 # skip the overpass, if data is not enough, DW, 04/21/2019 # ...
\name{gagerr} \alias{gagerr} \docType{data} \title{ Gauge R&R Study} \description{ Data from the Gauge R&R Study in chapter 5 of Design and Analysis of Experiments with R } \usage{data(gagerr)} \format{ A data frame with 60 observations on the following 3 variables. \describe{ \item{\code{part}}{a f...
/man/gagerr.Rd
no_license
cran/daewr
R
false
false
693
rd
\name{gagerr} \alias{gagerr} \docType{data} \title{ Gauge R&R Study} \description{ Data from the Gauge R&R Study in chapter 5 of Design and Analysis of Experiments with R } \usage{data(gagerr)} \format{ A data frame with 60 observations on the following 3 variables. \describe{ \item{\code{part}}{a f...
\name{primes} \alias{primes} \docType{data} \title{ Primes numbers less than 2003} \description{ Prime numbers between 1 and 2003. } \usage{data(primes)} \format{ The format is: num [1:304] 2 3 5 7 11 13 17 19 23 29 ... } \source{ Generated using \url{http://www.rsok.com/~jrm/printprimes.html}. } \examples{ data...
/man/primes.Rd
no_license
jverzani/UsingR
R
false
false
363
rd
\name{primes} \alias{primes} \docType{data} \title{ Primes numbers less than 2003} \description{ Prime numbers between 1 and 2003. } \usage{data(primes)} \format{ The format is: num [1:304] 2 3 5 7 11 13 17 19 23 29 ... } \source{ Generated using \url{http://www.rsok.com/~jrm/printprimes.html}. } \examples{ data...
library(GeoRange) ### Name: GeoRange_MultiTaxa ### Title: Function to tabulate number of occurrences/locations, six ### geographic range measures, minimum and maximum latitude and longitude ### for each taxon in a dataset ### Aliases: GeoRange_MultiTaxa ### ** Examples ## Not run: ##D data(BivalvePBDB) ##D Biv...
/data/genthat_extracted_code/GeoRange/examples/GeoRange_MultiTaxa.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
439
r
library(GeoRange) ### Name: GeoRange_MultiTaxa ### Title: Function to tabulate number of occurrences/locations, six ### geographic range measures, minimum and maximum latitude and longitude ### for each taxon in a dataset ### Aliases: GeoRange_MultiTaxa ### ** Examples ## Not run: ##D data(BivalvePBDB) ##D Biv...
#' geom_scalebar #' #' Creates a scale bar in a ggplot #' #' Uses geom_segment to create a black and white scale bar in horizontal direction. #' Is not able to give any information about the magnification itself! #' The exact length of the scale bar has to be known. #' #' @param range A vector with two values. Giving t...
/R/geom_scalebar.R
no_license
reneplonus/ototools
R
false
false
1,995
r
#' geom_scalebar #' #' Creates a scale bar in a ggplot #' #' Uses geom_segment to create a black and white scale bar in horizontal direction. #' Is not able to give any information about the magnification itself! #' The exact length of the scale bar has to be known. #' #' @param range A vector with two values. Giving t...
library(data.table) library(dplyr) # Download the zip file and uncomress it. plot2 <- function() { # read the full data set the location relative to the script location full <- fread("../household_power_consumption.txt",na.strings = "?") setkey(full,Date) # extract the required data for ploting. x <- full[lis...
/plot2.R
no_license
jj6144/ExData_Plotting1
R
false
false
800
r
library(data.table) library(dplyr) # Download the zip file and uncomress it. plot2 <- function() { # read the full data set the location relative to the script location full <- fread("../household_power_consumption.txt",na.strings = "?") setkey(full,Date) # extract the required data for ploting. x <- full[lis...
rm(list=ls()) # library(INLA) library(boot) library(vioplot) library(parallel) library(HDInterval) library(KernSmooth) # INLA:::inla.dynload.workaround() # #FUNCTIONS # # goodRatios = function( loggedStuff ){ #loggedStuff: the log(x) of the values (x) to compute the following ratio # r_i = x_...
/try2/quickScripts/singleCompsAll.r
no_license
gasduster99/sppComp
R
false
false
23,363
r
rm(list=ls()) # library(INLA) library(boot) library(vioplot) library(parallel) library(HDInterval) library(KernSmooth) # INLA:::inla.dynload.workaround() # #FUNCTIONS # # goodRatios = function( loggedStuff ){ #loggedStuff: the log(x) of the values (x) to compute the following ratio # r_i = x_...
\name{bs.wilcox.test} \alias{bs.wilcox.test} \title{An example function from the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R} \description{An example function from Chapter 2 of the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data...
/man/bs.wilcox.test.Rd
no_license
42n4/dmr.stats
R
false
false
967
rd
\name{bs.wilcox.test} \alias{bs.wilcox.test} \title{An example function from the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R} \description{An example function from Chapter 2 of the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data...
rm(list=ls()) ptm <- proc.time() options(stringsAsFactors = F) library("igraph") library("magrittr") #------------------source functions below--------------------------------------- source(file.path(getwd(), "function_scripts_directory", "inner_and_outer_weight_functions.R")) # -----------------input file setup.-----...
/02.inner_and_outer_weight.01.calculation.R
no_license
sciencepeak/MWMM
R
false
false
3,919
r
rm(list=ls()) ptm <- proc.time() options(stringsAsFactors = F) library("igraph") library("magrittr") #------------------source functions below--------------------------------------- source(file.path(getwd(), "function_scripts_directory", "inner_and_outer_weight_functions.R")) # -----------------input file setup.-----...
#RF taking NVIS flatfile in and predicting the MVG #TO DO #Test to do all MVGs - library(rpart) library(randomForest) library(MASS) library(rfPermute) start_time <- Sys.time() ######################################### output.predict.name <- "NVIS_Predict_MVG.csv" output.wd <- "./outputs" input.file ...
/NVIS_RF_MVGv6.2.R
no_license
DOEENVIS/NVIS-Randomforests
R
false
false
15,586
r
#RF taking NVIS flatfile in and predicting the MVG #TO DO #Test to do all MVGs - library(rpart) library(randomForest) library(MASS) library(rfPermute) start_time <- Sys.time() ######################################### output.predict.name <- "NVIS_Predict_MVG.csv" output.wd <- "./outputs" input.file ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package-pdynmc.R, R/pdynmc_estFct.R \docType{package} \name{pdynmc} \alias{pdynmc} \title{pdynmc: A package for moment conditions based estimation of linear dynamic panel data models} \usage{ pdynmc( dat, varname.i, varname.t, use....
/man/pdynmc.Rd
no_license
cran/pdynmc
R
false
true
20,025
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package-pdynmc.R, R/pdynmc_estFct.R \docType{package} \name{pdynmc} \alias{pdynmc} \title{pdynmc: A package for moment conditions based estimation of linear dynamic panel data models} \usage{ pdynmc( dat, varname.i, varname.t, use....
library('tximport') library('DESeq2') files = c("/Users/patrickbell/School_Repository/Homework_8/problem_1/output_directory_1/abundance.tsv","/Users/patrickbell/School_Repository/Homework_8/problem_1/output_directory_2/abundance.tsv", "/Users/patrickbell/School_Repository/Homework_8/problem_1/output_direc...
/Homework_8/try_it_out.R
no_license
patrickbell12/School_Repository
R
false
false
2,087
r
library('tximport') library('DESeq2') files = c("/Users/patrickbell/School_Repository/Homework_8/problem_1/output_directory_1/abundance.tsv","/Users/patrickbell/School_Repository/Homework_8/problem_1/output_directory_2/abundance.tsv", "/Users/patrickbell/School_Repository/Homework_8/problem_1/output_direc...
library(gridExtra) library(ggplot2) library(dplyr) scatter_rsa <- function(){ # Figure fig:scatter_rsa_prefix data <- read.csv("report/scatter_rsa.csv") plot0 <- ggplot(data, aes(x=tree, y=rep0)) + geom_point(alpha=0.02, shape = '.') + geom_smooth(method='lm') + xlab("Tree Kernel") + ...
/plot.R
permissive
xiaoqis0821/correlating-neural-and-symbolic-representations-of-language
R
false
false
3,058
r
library(gridExtra) library(ggplot2) library(dplyr) scatter_rsa <- function(){ # Figure fig:scatter_rsa_prefix data <- read.csv("report/scatter_rsa.csv") plot0 <- ggplot(data, aes(x=tree, y=rep0)) + geom_point(alpha=0.02, shape = '.') + geom_smooth(method='lm') + xlab("Tree Kernel") + ...
closedCapMh2 <- function(CH, ci = 0.95, ciType=c("normal", "MARK"), ...) { # CH is a 1/0 capture history matrix, animals x occasions, OR # a vector of capture frequencies of length equal to the number # of occasions - trailing zeros are required. # ci is the required confidence interval if (is.matrix(CH) |...
/R/closedCapMh2.R
no_license
mikemeredith/wiqid
R
false
false
3,393
r
closedCapMh2 <- function(CH, ci = 0.95, ciType=c("normal", "MARK"), ...) { # CH is a 1/0 capture history matrix, animals x occasions, OR # a vector of capture frequencies of length equal to the number # of occasions - trailing zeros are required. # ci is the required confidence interval if (is.matrix(CH) |...
MPLayer <- function(input_dim, num_fp, neighbor_dim, stride, actfun){ #value_dim <- getNewInpDim(input_dim, neighbor_dim, stride) mplayer <- Layer(actfun) mplayer$num_fp <- num_fp mplayer$neighbor_dim <- neighbor_dim mplayer$stride <- stride mplayer$grad <- NA mplayer$max_loc <- NA mplay...
/MPLayer.R
no_license
LinHungShi/ConvolutionalNeuralNetwork
R
false
false
445
r
MPLayer <- function(input_dim, num_fp, neighbor_dim, stride, actfun){ #value_dim <- getNewInpDim(input_dim, neighbor_dim, stride) mplayer <- Layer(actfun) mplayer$num_fp <- num_fp mplayer$neighbor_dim <- neighbor_dim mplayer$stride <- stride mplayer$grad <- NA mplayer$max_loc <- NA mplay...
household_power_consumption <- read.csv("~/R/R_lectures/Data_cousera/exploratory/household_power_consumption.txt", sep=";") household_power_consumption$Timestamp <- strptime(household_power_consumption$Date, format = "%d/%m/%Y") household_power_consumption$Dates <- as.Date(household_power_consumption$Timestamp, "%m/%d...
/figure/Plot1.R
no_license
Niruma/ExData_Plotting1
R
false
false
673
r
household_power_consumption <- read.csv("~/R/R_lectures/Data_cousera/exploratory/household_power_consumption.txt", sep=";") household_power_consumption$Timestamp <- strptime(household_power_consumption$Date, format = "%d/%m/%Y") household_power_consumption$Dates <- as.Date(household_power_consumption$Timestamp, "%m/%d...
indicator<-function(data){ # NOTE : The code inputs the combined Enrollment and Repeat dataset # and ouputs the same dataset with an additional column indicating repeat # year datapoints data$Date<-as.Date(as.character(data$Date),format="%m/%d/%Y") data$Indicator<-1 for (i in 1:nrow(data)){ col.no...
/1.Codes/indicator.R
no_license
InspectorFowler/SAT-Score-Prediction
R
false
false
804
r
indicator<-function(data){ # NOTE : The code inputs the combined Enrollment and Repeat dataset # and ouputs the same dataset with an additional column indicating repeat # year datapoints data$Date<-as.Date(as.character(data$Date),format="%m/%d/%Y") data$Indicator<-1 for (i in 1:nrow(data)){ col.no...
library(dplyr) library(ggplot2) library(ggforce) apply_pattern_theme = function(bg_hex, caption_hex){ theme( plot.background = element_rect(fill = bg_hex), panel.background = element_rect(fill = bg_hex), panel.grid = element_blank(), plot.caption = element_text(family = "Open Sans", ...
/scripts/pattern_24.R
no_license
crouzet-o/patterns
R
false
false
2,318
r
library(dplyr) library(ggplot2) library(ggforce) apply_pattern_theme = function(bg_hex, caption_hex){ theme( plot.background = element_rect(fill = bg_hex), panel.background = element_rect(fill = bg_hex), panel.grid = element_blank(), plot.caption = element_text(family = "Open Sans", ...
## ----eval=FALSE---------------------------------------------------------- # df <- read_civis("schema.tablename", database = "my-database") ## ----eval=FALSE---------------------------------------------------------- # options(civis.default_db = "my-database") # df <- read_civis("schema.tablename") ## ----eval=FAL...
/data/genthat_extracted_code/civis/vignettes/data_import_and_export.R
no_license
surayaaramli/typeRrh
R
false
false
3,363
r
## ----eval=FALSE---------------------------------------------------------- # df <- read_civis("schema.tablename", database = "my-database") ## ----eval=FALSE---------------------------------------------------------- # options(civis.default_db = "my-database") # df <- read_civis("schema.tablename") ## ----eval=FAL...
#Marco Pompilj #Population Pyramid for Final Project #Load packages we need library(readr) library(dplyr) library(ggplot2) library(RColorBrewer) #Read in IPUMS data a <- read_csv('usa_00015.csv') #Create vector of age category labels agecats <- '0-9' for (i in 1:7) { agecats <- c(agecats,paste(i,'0-',i,9,sep='')...
/finalpyramid2000.R
no_license
audiable/US_Hist_Data
R
false
false
1,802
r
#Marco Pompilj #Population Pyramid for Final Project #Load packages we need library(readr) library(dplyr) library(ggplot2) library(RColorBrewer) #Read in IPUMS data a <- read_csv('usa_00015.csv') #Create vector of age category labels agecats <- '0-9' for (i in 1:7) { agecats <- c(agecats,paste(i,'0-',i,9,sep='')...
sayHello<-function(name){ print(paste("Hi",name)) }
/R/sayHello.R
no_license
yucongran/sayHello
R
false
false
54
r
sayHello<-function(name){ print(paste("Hi",name)) }
########################################################### # Fit Linear Regression and Export as Rasters # ########################################################### #--- Read in rasters from folder #### result.folder <- c('data/sdm_output/occ-timeDependent/prediction/25-results/') conflict.wet <- stack...
/pixel-wise_lm.R
no_license
nkitratporn/timeCalibrated_hec
R
false
false
3,494
r
########################################################### # Fit Linear Regression and Export as Rasters # ########################################################### #--- Read in rasters from folder #### result.folder <- c('data/sdm_output/occ-timeDependent/prediction/25-results/') conflict.wet <- stack...
library(MASS) str(quakes) #객체의 구조확인 , 1000개의 관찰값, 5개의 변수 View(quakes) #V는 대문자에 유의 data(quakes); quakes #data 출력 (200개만 출력됨, 800개는 생략됨) str(quakes) head(quakes,200) #1행~200행까지 출력 (상위 200개) tail(quakes, 200) #하위 200개 summary(quakes$mag) #qukes라는 데이터프레임의 mag라는 열에 접근해서 요약한 값 hist(quakes$mag, breaks=seq(4,6.5,by=0...
/R_Programming/6주차_외부데이터표현.R
no_license
hongknights/R_datascience
R
false
false
5,274
r
library(MASS) str(quakes) #객체의 구조확인 , 1000개의 관찰값, 5개의 변수 View(quakes) #V는 대문자에 유의 data(quakes); quakes #data 출력 (200개만 출력됨, 800개는 생략됨) str(quakes) head(quakes,200) #1행~200행까지 출력 (상위 200개) tail(quakes, 200) #하위 200개 summary(quakes$mag) #qukes라는 데이터프레임의 mag라는 열에 접근해서 요약한 값 hist(quakes$mag, breaks=seq(4,6.5,by=0...
## Calculate environmental and demographic variances for percent cover ## and growth rates library(ggplot2) library(ggthemes) library(reshape2) library(plyr) library(synchrony) library(communitySynchrony) ### Function for inverse of %in% "%w/o%" <- function(x, y) x[!x %in% y] # x without y #### #### SUPPLEMENTAR...
/runscripts/calc_species_variances.R
no_license
atredennick/community_synchrony
R
false
false
12,163
r
## Calculate environmental and demographic variances for percent cover ## and growth rates library(ggplot2) library(ggthemes) library(reshape2) library(plyr) library(synchrony) library(communitySynchrony) ### Function for inverse of %in% "%w/o%" <- function(x, y) x[!x %in% y] # x without y #### #### SUPPLEMENTAR...
prime <- function(n) { if (n == 1 || n == 2) { return(TRUE) } if (n %% 2 == 0) { return(FALSE) } for (i in seq(3, max(3, ceiling(sqrt(n))), 2)) { if ((n %% i) == 0) { return(FALSE) } } return(TRUE) }
/p3/prime.R
no_license
albertobenavides/SimulacionSistemasR
R
false
false
236
r
prime <- function(n) { if (n == 1 || n == 2) { return(TRUE) } if (n %% 2 == 0) { return(FALSE) } for (i in seq(3, max(3, ceiling(sqrt(n))), 2)) { if ((n %% i) == 0) { return(FALSE) } } return(TRUE) }
library(RoughSetKnowledgeReduction) ### Name: findAllReductsFromCore ### Title: FIND ALL REDUCTS FROM CORE ### Aliases: findAllReductsFromCore ### Keywords: logic rough set ### ** Examples exampleMatrix2 <- matrix(c(1,1,0,1,1,2,2,0,0,0,1,1,1,2,0, 0,0,0,0,0,2,1,0,0,1,2,2,2,1,1,0,0,2,2,2),ncol = 5) dt <- new(Class="D...
/data/genthat_extracted_code/RoughSetKnowledgeReduction/examples/findAllReductsFromCore.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
406
r
library(RoughSetKnowledgeReduction) ### Name: findAllReductsFromCore ### Title: FIND ALL REDUCTS FROM CORE ### Aliases: findAllReductsFromCore ### Keywords: logic rough set ### ** Examples exampleMatrix2 <- matrix(c(1,1,0,1,1,2,2,0,0,0,1,1,1,2,0, 0,0,0,0,0,2,1,0,0,1,2,2,2,1,1,0,0,2,2,2),ncol = 5) dt <- new(Class="D...
\name{imstrsplit} \alias{imstrsplit} \title{ Create an iterator for splitting binary or character input into a matrix } \description{ \code{imstrsplit} takes a binary connection or character vector (which is interpreted as a file name) and splits it into a character matrix according to the separator. } \usage...
/man/imstrsplit.Rd
no_license
sdsxpln/iotools
R
false
false
3,430
rd
\name{imstrsplit} \alias{imstrsplit} \title{ Create an iterator for splitting binary or character input into a matrix } \description{ \code{imstrsplit} takes a binary connection or character vector (which is interpreted as a file name) and splits it into a character matrix according to the separator. } \usage...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log_partitions_functions.R \name{log_part_G_g} \alias{log_part_G_g} \title{The first order gradient of log-partation function of Gaussian distribution} \usage{ log_part_G_g(Theta) } \arguments{ \item{Theta}{a matrix of natural parameter} } \v...
/man/log_part_G_g.Rd
no_license
YipengUva/RpESCA
R
false
true
644
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log_partitions_functions.R \name{log_part_G_g} \alias{log_part_G_g} \title{The first order gradient of log-partation function of Gaussian distribution} \usage{ log_part_G_g(Theta) } \arguments{ \item{Theta}{a matrix of natural parameter} } \v...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fourier.R \name{basesin} \alias{basesin} \title{Sin component of fourier series} \usage{ basesin(level, t) } \arguments{ \item{level}{level: 1, 2, or 3} \item{t}{time} } \description{ Sin component of fourier series }
/man/basesin.Rd
permissive
mrc-ide/umbrella
R
false
true
297
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fourier.R \name{basesin} \alias{basesin} \title{Sin component of fourier series} \usage{ basesin(level, t) } \arguments{ \item{level}{level: 1, 2, or 3} \item{t}{time} } \description{ Sin component of fourier series }
# TileDB Storage Platform API # # TileDB Storage Platform REST API # # The version of the OpenAPI document: 2.0.4 # # Generated by: https://openapi-generator.tech #' @docType class #' @title FilterOption #' #' @description FilterOption Class #' #' @format An \code{R6Class} generator object #' #' @importFrom R6 R6Clas...
/R/filter_option.R
no_license
jfontestad/tldbclr
R
false
false
1,724
r
# TileDB Storage Platform API # # TileDB Storage Platform REST API # # The version of the OpenAPI document: 2.0.4 # # Generated by: https://openapi-generator.tech #' @docType class #' @title FilterOption #' #' @description FilterOption Class #' #' @format An \code{R6Class} generator object #' #' @importFrom R6 R6Clas...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Implies.R \name{Implies} \alias{Implies} \title{Implies} \usage{ Implies(x, y, anyNAx = TRUE, anyNAy = TRUE) } \arguments{ \item{x, y}{Logical vectors of equal length.} \item{anyNAx, anyNAy}{Whether \code{x,y} may contain \code{NA}. If \code...
/man/Implies.Rd
no_license
HughParsonage/hutilscpp
R
false
true
1,252
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Implies.R \name{Implies} \alias{Implies} \title{Implies} \usage{ Implies(x, y, anyNAx = TRUE, anyNAy = TRUE) } \arguments{ \item{x, y}{Logical vectors of equal length.} \item{anyNAx, anyNAy}{Whether \code{x,y} may contain \code{NA}. If \code...
#' Scale that supports formatted numbers #' #' @description #' `r lifecycle::badge("experimental")` #' #' This scale is used by default in ggplot2 with columns created with [num()]. #' #' @inheritDotParams ggplot2::continuous_scale #' @param guide,position Passed on to [ggplot2::continuous_scale()] #' @param rescaler,...
/R/ggplot2.R
permissive
r-lib/pillar
R
false
false
3,399
r
#' Scale that supports formatted numbers #' #' @description #' `r lifecycle::badge("experimental")` #' #' This scale is used by default in ggplot2 with columns created with [num()]. #' #' @inheritDotParams ggplot2::continuous_scale #' @param guide,position Passed on to [ggplot2::continuous_scale()] #' @param rescaler,...
################################################################################### # PART 1 - Data Import, Audit & Cleaning # 1. Importing 10Mn Dataset & Creating Train & Test ################################################################################### data.load <- function(data.size){ if(data.size == '10mn'...
/InternalFunctions.R
no_license
jay-ds-labs/RecommendationEngine
R
false
false
16,870
r
################################################################################### # PART 1 - Data Import, Audit & Cleaning # 1. Importing 10Mn Dataset & Creating Train & Test ################################################################################### data.load <- function(data.size){ if(data.size == '10mn'...
# Acceptance probability for split type1 log_accept_split_extended_full_type1 <- function(k,mu,newmu,allocate,newallocate,ind1,ind2,oldeps,neweps,oldew,newew,indold,wt,newwt,pupdate,us,ewt1.range){ # Log complate data likelihood ratio like_part <- complete_log_like_extended_full(newmu,newallocate,neweps,newe...
/additional_functions/log_accept_split_extended_full_type1.R
no_license
lfcampos/Space-and-time-with-fixed-K
R
false
false
3,053
r
# Acceptance probability for split type1 log_accept_split_extended_full_type1 <- function(k,mu,newmu,allocate,newallocate,ind1,ind2,oldeps,neweps,oldew,newew,indold,wt,newwt,pupdate,us,ewt1.range){ # Log complate data likelihood ratio like_part <- complete_log_like_extended_full(newmu,newallocate,neweps,newe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FitLm.R \name{FitLm} \alias{FitLm} \alias{ResidLm} \alias{Detrend} \title{Fast estimates of linear regression} \usage{ FitLm(y, ..., weights = NULL, se = FALSE, r2 = se) ResidLm(y, ..., weights = NULL) Detrend(y, time = seq_along(y)) } \arg...
/man/FitLm.Rd
no_license
eliocamp/metR
R
false
true
1,979
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FitLm.R \name{FitLm} \alias{FitLm} \alias{ResidLm} \alias{Detrend} \title{Fast estimates of linear regression} \usage{ FitLm(y, ..., weights = NULL, se = FALSE, r2 = se) ResidLm(y, ..., weights = NULL) Detrend(y, time = seq_along(y)) } \arg...
# File: R01_3_3_Histograms.R # Course: R01: R: An introduction # Chapter: 3: Basic graphics # Section: 3: Histograms # Author: Barton Poulson, datalab.cc, @bartonpoulson # Date: 2016-05-24 # LOAD PACKAGES ############################################ library(datasets) # LOAD DATA #############################...
/R/R01_Course_Files/R01_3_3_Histograms.R
no_license
mortenjc/lang
R
false
false
1,429
r
# File: R01_3_3_Histograms.R # Course: R01: R: An introduction # Chapter: 3: Basic graphics # Section: 3: Histograms # Author: Barton Poulson, datalab.cc, @bartonpoulson # Date: 2016-05-24 # LOAD PACKAGES ############################################ library(datasets) # LOAD DATA #############################...
library(CharFun) ### Name: cfS_Beta ### Title: Characteristic function of Beta distribution ### Aliases: cfS_Beta ### ** Examples ## EXAMPLE1 (CF of the Beta distribution with alpha = 1/2, beta = 3/2) alpha <- 1 / 2 beta <- 3 / 2 t <- seq(-50, 50, length.out = 501) plotGraf(function(t) cfX_Beta(t, alpha, beta), t...
/data/genthat_extracted_code/CharFun/examples/cfS_Beta.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
679
r
library(CharFun) ### Name: cfS_Beta ### Title: Characteristic function of Beta distribution ### Aliases: cfS_Beta ### ** Examples ## EXAMPLE1 (CF of the Beta distribution with alpha = 1/2, beta = 3/2) alpha <- 1 / 2 beta <- 3 / 2 t <- seq(-50, 50, length.out = 501) plotGraf(function(t) cfX_Beta(t, alpha, beta), t...
.onLoad <- function(libname=find.package("pam"), pkgname="pam") { if(getRversion() >= "2.5.1") { utils::globalVariables( c("ped_status", "ped_time", "tstart", "tend", "interval", "intlen", "intmid", ".", "eff", "high", "low", "type", "se", "tmp.fit", "tmp.se", "hazard", "lower", "upper", "term", "x", ...
/R/zzz.R
permissive
adibender/pamm
R
false
false
469
r
.onLoad <- function(libname=find.package("pam"), pkgname="pam") { if(getRversion() >= "2.5.1") { utils::globalVariables( c("ped_status", "ped_time", "tstart", "tend", "interval", "intlen", "intmid", ".", "eff", "high", "low", "type", "se", "tmp.fit", "tmp.se", "hazard", "lower", "upper", "term", "x", ...
#internal warbleR function called by catalog rectw.INTFUN <- function(xl, yb, xr, yt, bor, cl, ang = NULL, den = NULL, pattern = "no.pattern", lw = 2, lt = 1) { if(pattern == "no.pattern") rect(xleft = xl, ybottom = yb, xright = xr, ytop = yt, border = bor, col = cl, angle = ang, density = den, lwd = lw, lty = l...
/R/rectw.INTFUN.R
no_license
RTbecard/warbleR
R
false
false
1,879
r
#internal warbleR function called by catalog rectw.INTFUN <- function(xl, yb, xr, yt, bor, cl, ang = NULL, den = NULL, pattern = "no.pattern", lw = 2, lt = 1) { if(pattern == "no.pattern") rect(xleft = xl, ybottom = yb, xright = xr, ytop = yt, border = bor, col = cl, angle = ang, density = den, lwd = lw, lty = l...
#' Quarterly Russian real money income #' #' A dataset containing real money income index and per capita real income. #' Source: \url{http://sophist.hse.ru/hse/nindex.shtml}. #' Downloaded on 18.02.2016. #' #' @format A zooreg object with 93 rows and 3 variables: #' \describe{ #' \item{HHI_Q_DIRI}{Index of real money...
/R/datasets.R
no_license
bdemeshev/sophisthse
R
false
false
1,337
r
#' Quarterly Russian real money income #' #' A dataset containing real money income index and per capita real income. #' Source: \url{http://sophist.hse.ru/hse/nindex.shtml}. #' Downloaded on 18.02.2016. #' #' @format A zooreg object with 93 rows and 3 variables: #' \describe{ #' \item{HHI_Q_DIRI}{Index of real money...
## ## con.0 <- read.table("contour_0_0.xyz", sep="\t") names(con.0) <- c("X","Y","Z") con.1 <- read.table("contour_0_1.xyz", sep="\t") names(con.1) <- c("X","Y","Z") con.2 <- read.table("contour_0_2.xyz", sep="\t") names(con.2) <- c("X","Y","Z") con.3 <- read.table("contour_0_3.xyz", sep="\t") names(con.3) <- c("X","Y...
/Mapping/process-contours.R
no_license
phyllog/FishInverAtlas_Ricard
R
false
false
5,470
r
## ## con.0 <- read.table("contour_0_0.xyz", sep="\t") names(con.0) <- c("X","Y","Z") con.1 <- read.table("contour_0_1.xyz", sep="\t") names(con.1) <- c("X","Y","Z") con.2 <- read.table("contour_0_2.xyz", sep="\t") names(con.2) <- c("X","Y","Z") con.3 <- read.table("contour_0_3.xyz", sep="\t") names(con.3) <- c("X","Y...
temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) file <- unzip(temp) unlink(temp) power <- read.table(file, header=T, sep=";") power$Date <- as.Date(power$Date, format="%d/%m/%Y") df <- power[(power$Date=="2007-02-01") | (power$Date=="20...
/plot2.R
no_license
arash57000/ExData_Plotting1
R
false
false
990
r
temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) file <- unzip(temp) unlink(temp) power <- read.table(file, header=T, sep=";") power$Date <- as.Date(power$Date, format="%d/%m/%Y") df <- power[(power$Date=="2007-02-01") | (power$Date=="20...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/other_functions.R \name{autoline} \alias{autoline} \title{New Line Feed for Long Strings (Wrapper)} \usage{ autoline(text, top = "auto", rel = 9) } \arguments{ \item{text}{Character or factor vector.} \item{top}{Integer. How many characters ...
/man/autoline.Rd
no_license
alexandereric995/lares
R
false
true
2,117
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/other_functions.R \name{autoline} \alias{autoline} \title{New Line Feed for Long Strings (Wrapper)} \usage{ autoline(text, top = "auto", rel = 9) } \arguments{ \item{text}{Character or factor vector.} \item{top}{Integer. How many characters ...
all_with_dates <- read.csv("~/Uni/Master/WiSe 2014:15/PIP/Data Analysis/screenshots/all_with_dates.csv", stringsAsFactors=FALSE) all_with_dates$a <- as.numeric(all_with_dates$a) x <- data.frame(date=all_with_dates$xdate, value=all_with_dates$x) y <- data.frame(date=all_with_dates$ydate, value=all_with_dates$y) z <- dat...
/screenshots.R
no_license
fionade/PRO4.0_DataAnalysis
R
false
false
979
r
all_with_dates <- read.csv("~/Uni/Master/WiSe 2014:15/PIP/Data Analysis/screenshots/all_with_dates.csv", stringsAsFactors=FALSE) all_with_dates$a <- as.numeric(all_with_dates$a) x <- data.frame(date=all_with_dates$xdate, value=all_with_dates$x) y <- data.frame(date=all_with_dates$ydate, value=all_with_dates$y) z <- dat...
\name{stepp.edge} \alias{stepp.edge} %- Also NEED an '\alias' for EACH other topic documented here. \title{ The method performs an edge analysis on the STEPP GLM model estimate objects. } \description{ Perform an edge analysis on the STEPP GLM model estimate objects. } \usage{ stepp.edge(est, criteria, j=2, boo...
/man/stepp.edge.Rd
no_license
cran/stepp
R
false
false
1,442
rd
\name{stepp.edge} \alias{stepp.edge} %- Also NEED an '\alias' for EACH other topic documented here. \title{ The method performs an edge analysis on the STEPP GLM model estimate objects. } \description{ Perform an edge analysis on the STEPP GLM model estimate objects. } \usage{ stepp.edge(est, criteria, j=2, boo...
tar_test("database$get_row()", { out <- database_init() row <- list(name = "abc", string = "run(xyz)", children = list(letters)) out$set_row(row) expect_equal(out$get_row("abc"), row) }) tar_test("database$exists_row()", { out <- database_init() row <- list(name = "abc", string = "run(xyz)", children = lis...
/tests/testthat/test-class_database.R
permissive
boshek/targets
R
false
false
9,627
r
tar_test("database$get_row()", { out <- database_init() row <- list(name = "abc", string = "run(xyz)", children = list(letters)) out$set_row(row) expect_equal(out$get_row("abc"), row) }) tar_test("database$exists_row()", { out <- database_init() row <- list(name = "abc", string = "run(xyz)", children = lis...
euclidean <- function(x, y) { while (y!= 0) { t <- y y <- x %% y x <- t } return(x) }
/ShashiRojanlab3/R/Euclidean.R
no_license
rojanka/shashiRojanlab3
R
false
false
104
r
euclidean <- function(x, y) { while (y!= 0) { t <- y y <- x %% y x <- t } return(x) }
#phase2 month 1 week 4 gcad quiz #1 url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" f <- file.path(getwd(), "ss06hid.csv") download.file(url, f) dt <- data.table(read.csv(f)) varNames <- names(dt) varNamesSplit <- strsplit(varNames, "wgtp") varNamesSplit[[123]] #2 url <- "https://d396qusza...
/gcad_week4_quiz.r
no_license
rv-grmcclure/dsa
R
false
false
1,438
r
#phase2 month 1 week 4 gcad quiz #1 url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" f <- file.path(getwd(), "ss06hid.csv") download.file(url, f) dt <- data.table(read.csv(f)) varNames <- names(dt) varNamesSplit <- strsplit(varNames, "wgtp") varNamesSplit[[123]] #2 url <- "https://d396qusza...
library(huxtable) ### Name: by_ranges ### Title: Map numeric ranges to cell properties ### Aliases: by_ranges ### ** Examples ht <- huxtable(c(1, 3, 5)) map_background_color(ht, by_ranges( c(2, 4), c("red", "yellow", "blue") )) map_background_color(ht, by_ranges( c(2, 4), ...
/data/genthat_extracted_code/huxtable/examples/by_ranges.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
625
r
library(huxtable) ### Name: by_ranges ### Title: Map numeric ranges to cell properties ### Aliases: by_ranges ### ** Examples ht <- huxtable(c(1, 3, 5)) map_background_color(ht, by_ranges( c(2, 4), c("red", "yellow", "blue") )) map_background_color(ht, by_ranges( c(2, 4), ...
source("load_data.R") plot2 <- function(data=NULL) { if(is.null(data)) data <- load_data() png("plot2.png", width=400, height=400) plot(data$Time, data$Global_active_power, type="l", xlab="", ylab="Global Active Power (kilowatts)") dev.off() }
/plotb.R
no_license
Kausthub8/Individual-household-electric-power-consumption-Analysis
R
false
false
308
r
source("load_data.R") plot2 <- function(data=NULL) { if(is.null(data)) data <- load_data() png("plot2.png", width=400, height=400) plot(data$Time, data$Global_active_power, type="l", xlab="", ylab="Global Active Power (kilowatts)") dev.off() }
#' Generates dot plots of dosing events against time for each individual in a NONMEM object. #' @name timeEventDPlot #' @title NONMEM Time to Event Dot Plot #' @param obj An object of class \code{NMRun}, \code{NMProblem}, or \code{data.frame}. The object from which data will be plotted. #' @param tVar Time varia...
/R/timeEventPlot.R
no_license
akshilpatel/RNMGraphics
R
false
false
10,308
r
#' Generates dot plots of dosing events against time for each individual in a NONMEM object. #' @name timeEventDPlot #' @title NONMEM Time to Event Dot Plot #' @param obj An object of class \code{NMRun}, \code{NMProblem}, or \code{data.frame}. The object from which data will be plotted. #' @param tVar Time varia...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/tests/testthat/test-parquet.R
permissive
andygrove/arrow
R
false
false
15,547
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
## FIRST TRY AT FULL THING pred1 <- function(sentence) { preds <- datafull sentence <- gsub("[^A-Za-z0-9'# -]", "", sentence) #what we're keeping words <- unlist(strsplit(sentence, "[ ]")) #actually make the split word2 <- words[length(words)] if(length(grep(word2, preds$w2))>0){ preds <- pr...
/Hood predictor.R
no_license
Libardo1/DSCapstone
R
false
false
3,953
r
## FIRST TRY AT FULL THING pred1 <- function(sentence) { preds <- datafull sentence <- gsub("[^A-Za-z0-9'# -]", "", sentence) #what we're keeping words <- unlist(strsplit(sentence, "[ ]")) #actually make the split word2 <- words[length(words)] if(length(grep(word2, preds$w2))>0){ preds <- pr...
library(dplyr) library(ggplot2) #read data NEI <- readRDS(".\\Data\\summarySCC_PM25.rds") SCC <- readRDS(".\\Data\\Source_Classification_Code.rds") #creating dataset with data to be plotted motorVehSources <- SCC[apply(SCC, 1, function(i){any(grepl("[Vv][Ee][Hh]" ...
/Scripts/plot5.R
no_license
TheMrCSC/EDA-FinalProject
R
false
false
855
r
library(dplyr) library(ggplot2) #read data NEI <- readRDS(".\\Data\\summarySCC_PM25.rds") SCC <- readRDS(".\\Data\\Source_Classification_Code.rds") #creating dataset with data to be plotted motorVehSources <- SCC[apply(SCC, 1, function(i){any(grepl("[Vv][Ee][Hh]" ...
library(BuenColors) library(data.table) library(circlize) library(ComplexHeatmap) library(dplyr) library(SummarizedExperiment) library(Matrix) # Import data sdf <- readRDS("../output/21March2020_signac_process.rds") se <- readRDS("../output/27March_mutSE_filt_CRC.rds") afp <- assays(se)[["allele_frequency"]] # set co...
/figure_CRC/code/05_supplemental_heatmap.R
no_license
ChenPeizhan/mtscATACpaper_reproducibility
R
false
false
1,406
r
library(BuenColors) library(data.table) library(circlize) library(ComplexHeatmap) library(dplyr) library(SummarizedExperiment) library(Matrix) # Import data sdf <- readRDS("../output/21March2020_signac_process.rds") se <- readRDS("../output/27March_mutSE_filt_CRC.rds") afp <- assays(se)[["allele_frequency"]] # set co...
library(shiny) library(caret) library(randomForest) # the following code gets called once data(faithful) # build a simple linear regression model set.seed(12345) inTrain <- createDataPartition(y=faithful$waiting, p=0.70, list=FALSE) trainFaith <- faithful[inTrain, ] testFaith <- faithful[-inTrain, ] model1 <- lm(erup...
/server.R
no_license
georgeli88/Developing_Data_Products
R
false
false
1,774
r
library(shiny) library(caret) library(randomForest) # the following code gets called once data(faithful) # build a simple linear regression model set.seed(12345) inTrain <- createDataPartition(y=faithful$waiting, p=0.70, list=FALSE) trainFaith <- faithful[inTrain, ] testFaith <- faithful[-inTrain, ] model1 <- lm(erup...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doRNG.R \name{\%dorng\%} \alias{\%dorng\%} \title{Reproducible Parallel Foreach Backend} \usage{ obj \%dorng\% ex } \arguments{ \item{obj}{a foreach object as returned by a call to \code{\link{foreach}}.} \item{ex}{the \code{R} expression to...
/man/grapes-dorng-grapes.Rd
no_license
renozao/doRNG
R
false
true
2,056
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doRNG.R \name{\%dorng\%} \alias{\%dorng\%} \title{Reproducible Parallel Foreach Backend} \usage{ obj \%dorng\% ex } \arguments{ \item{obj}{a foreach object as returned by a call to \code{\link{foreach}}.} \item{ex}{the \code{R} expression to...
#' validatr package #' #' validatr package for assessing predictions. #' #' @docType package #' @name validatr-package #' @importFrom stats var #' @importFrom ggplot2 autoplot fortify #' @importFrom magrittr %>% NULL #' @export magrittr::`%>%` #' @export ggplot2::autoplot # Ignore R CMD check: no visible binding for...
/R/validatr-package.R
permissive
camroach87/validatr
R
false
false
566
r
#' validatr package #' #' validatr package for assessing predictions. #' #' @docType package #' @name validatr-package #' @importFrom stats var #' @importFrom ggplot2 autoplot fortify #' @importFrom magrittr %>% NULL #' @export magrittr::`%>%` #' @export ggplot2::autoplot # Ignore R CMD check: no visible binding for...
## ## Model for analysis of tree ring chronologies at one spatial location ignoring different species ## ## Next: Remove Sigma, Sigma.inv, Sigma.epsilon and Sigma.epsilon.inv ## ## ## Note that in the code X represents the field T in the Barcast Model mcmc <- function(WI, WP, n.mcmc, mu.0.tilde, sigma.squared.0.tilde,...
/old code/nonSpatialBarcastWishartTakeTwo/mcmc.nonSpatialBarcast.R
no_license
jtipton25/barcast
R
false
false
8,034
r
## ## Model for analysis of tree ring chronologies at one spatial location ignoring different species ## ## Next: Remove Sigma, Sigma.inv, Sigma.epsilon and Sigma.epsilon.inv ## ## ## Note that in the code X represents the field T in the Barcast Model mcmc <- function(WI, WP, n.mcmc, mu.0.tilde, sigma.squared.0.tilde,...
\name{spatgraphs-sgc} \alias{sgc} \title{sgc} \description{ Cluster-object class for \code{\link{spatgraphs}}. Methods: print, plot. A cluster is a connected component. } \details{ A list with elements \tabular{rl}{ 'clusters'\tab A list with N vectors, each containing the indices of corresponding cluster's point...
/man/spatgraphs-sgc.Rd
no_license
fdzul/spatgraphs
R
false
false
548
rd
\name{spatgraphs-sgc} \alias{sgc} \title{sgc} \description{ Cluster-object class for \code{\link{spatgraphs}}. Methods: print, plot. A cluster is a connected component. } \details{ A list with elements \tabular{rl}{ 'clusters'\tab A list with N vectors, each containing the indices of corresponding cluster's point...
library(plotly) library(tidyverse) penguins_raw <- read_csv( 'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins_raw.csv' ) measures <- penguins_raw %>% mutate(`Body Mass (g)` = as.numeric(`Body Mass (g)`)/1000, `Flipper Length (mm)` = as.numeric(`...
/tidy_tuesday_7.28.2020.R
no_license
mathiasfls/tidytuesday-4
R
false
false
2,420
r
library(plotly) library(tidyverse) penguins_raw <- read_csv( 'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins_raw.csv' ) measures <- penguins_raw %>% mutate(`Body Mass (g)` = as.numeric(`Body Mass (g)`)/1000, `Flipper Length (mm)` = as.numeric(`...
sqr2scadAproximation <- function(gamm, taux, k, bn, bs, ix, iy, gamma, nobs, nvars, x, y, pf, dfmax, pmax, nlam, flmin, ulam, eps, maxit, vnames, group, intr) { ################################################################################# # call Fortran core gamma <- 2 * gamma...
/GSQR/R/sqr2scadAproximation.R
no_license
Sandy4321/GSQR
R
false
false
1,037
r
sqr2scadAproximation <- function(gamm, taux, k, bn, bs, ix, iy, gamma, nobs, nvars, x, y, pf, dfmax, pmax, nlam, flmin, ulam, eps, maxit, vnames, group, intr) { ################################################################################# # call Fortran core gamma <- 2 * gamma...
require(exactRankTests) testSize = 16 #20 if not pruned full <- sapply(1:ncol(testCalendarCoverageDetailed),function(x) sum(testCalendarCoverageDetailed[,x])) minimal <- sapply(1:ncol(testCalendarCoverageMinimalDetailed),function(x) sum(testCalendarCoverageMinimalDetailed[,x])) #remove last test suite as they not det...
/R_Scripts/calendarTests2.R
no_license
jhilliaho/EMCS-design-of-experiments
R
false
false
1,200
r
require(exactRankTests) testSize = 16 #20 if not pruned full <- sapply(1:ncol(testCalendarCoverageDetailed),function(x) sum(testCalendarCoverageDetailed[,x])) minimal <- sapply(1:ncol(testCalendarCoverageMinimalDetailed),function(x) sum(testCalendarCoverageMinimalDetailed[,x])) #remove last test suite as they not det...
library(sf) library(tmap) library(leaflet) library(tmaptools) library(tidyverse) library(classInt) library(shiny) library(RColorBrewer) library(here) #dir <- getwd() #here() NUTS3 <- geojson_read("https://opendata.arcgis.com/datasets/473aefdcee19418da7e5dbfdeacf7b90_2.geojson", what = "sp") NUTS3_SF <- st_as_sf(NUT...
/app 3.R
no_license
PhilipDW183/Assessment-attemps
R
false
false
6,736
r
library(sf) library(tmap) library(leaflet) library(tmaptools) library(tidyverse) library(classInt) library(shiny) library(RColorBrewer) library(here) #dir <- getwd() #here() NUTS3 <- geojson_read("https://opendata.arcgis.com/datasets/473aefdcee19418da7e5dbfdeacf7b90_2.geojson", what = "sp") NUTS3_SF <- st_as_sf(NUT...
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615834357-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
2,048
r
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
#' @importFrom stats rcauchy #' @importFrom stats rexp #' @importFrom stats rgamma #' @importFrom stats rlogis #' @importFrom stats rlnorm #' @importFrom stats rnorm #' @importFrom stats rt #' @importFrom stats runif #' @importFrom stats rweibull nsf.sim <- function(distribution = "normal", parameter = NULL, sample....
/R/nsf.sim.R
no_license
wqmeeker/RTseries
R
false
false
2,319
r
#' @importFrom stats rcauchy #' @importFrom stats rexp #' @importFrom stats rgamma #' @importFrom stats rlogis #' @importFrom stats rlnorm #' @importFrom stats rnorm #' @importFrom stats rt #' @importFrom stats runif #' @importFrom stats rweibull nsf.sim <- function(distribution = "normal", parameter = NULL, sample....
#' ggradar #' @author Ricardo Bion #' @export ggradar #' #' @export # most of the code is from http://rstudio-pubs-static.s3.amazonaws.com/5795_e6e6411731bb4f1b9cc7eb49499c2082.html ggradar <- function(plot.data, font.radar="Helvetica", values.radar = c("0%", ...
/R/ggradar.R
no_license
JonfinnKnutsen/ggradar
R
false
false
13,864
r
#' ggradar #' @author Ricardo Bion #' @export ggradar #' #' @export # most of the code is from http://rstudio-pubs-static.s3.amazonaws.com/5795_e6e6411731bb4f1b9cc7eb49499c2082.html ggradar <- function(plot.data, font.radar="Helvetica", values.radar = c("0%", ...
norm_vec <- function(x) sqrt(sum(x^2)) gramschmidt_for_qr <- function(Aqr) { # initializing Q and R matrix rows to 0 Q <- matrix(0,ncol(Aqr),ncol(Aqr)) R <- matrix(0,ncol(Aqr),ncol(Aqr)) for (j in 1:ncol(Aqr)) { v <- Aqr[,j] if (j > 1) { for (i in 1:(j-1)) { R[i,j] <- t(Q[,...
/week 3 submission/Homework3_R.R
no_license
mansee8/Statistical-Programming
R
false
false
1,257
r
norm_vec <- function(x) sqrt(sum(x^2)) gramschmidt_for_qr <- function(Aqr) { # initializing Q and R matrix rows to 0 Q <- matrix(0,ncol(Aqr),ncol(Aqr)) R <- matrix(0,ncol(Aqr),ncol(Aqr)) for (j in 1:ncol(Aqr)) { v <- Aqr[,j] if (j > 1) { for (i in 1:(j-1)) { R[i,j] <- t(Q[,...
## Part 1 ## library(ggplot2) x= c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) # a a=dhyper(x,20,80,20, log = F) View(a) # b b=phyper(x,20,80,20,lower.tail = T ) View(b) # c plot(x,a) # d plot(x,b) # e e1mean=sum(x*a) e2var=sum((e1mean-x)^2*a) e3sd=e2var^(1/2) # f f=runif(1000...
/Module 3 Project R File Xinfei Li.R
no_license
FireDragonBall/Statistical_Analysis_Probability_Distributions
R
false
false
5,833
r
## Part 1 ## library(ggplot2) x= c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) # a a=dhyper(x,20,80,20, log = F) View(a) # b b=phyper(x,20,80,20,lower.tail = T ) View(b) # c plot(x,a) # d plot(x,b) # e e1mean=sum(x*a) e2var=sum((e1mean-x)^2*a) e3sd=e2var^(1/2) # f f=runif(1000...
## LOPIT-DC U2OS novelty data(lopitdcU2OS2018) fData(lopitdcU2OS2018)$markers[fData(lopitdcU2OS2018)$markers %in% c("NUCLEUS/CHROMATIN","PROTEASOME", "RIBOSOME")] <- "unknown" dcU2OSTagmNoveltyparams <- tagmMcmcTrain_Nov(object = lopitdcU2OS20...
/code/codeforHPC/dcu2osNovelty.R
no_license
ococrook/2019-noveltyTagm
R
false
false
684
r
## LOPIT-DC U2OS novelty data(lopitdcU2OS2018) fData(lopitdcU2OS2018)$markers[fData(lopitdcU2OS2018)$markers %in% c("NUCLEUS/CHROMATIN","PROTEASOME", "RIBOSOME")] <- "unknown" dcU2OSTagmNoveltyparams <- tagmMcmcTrain_Nov(object = lopitdcU2OS20...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh3.R \name{gh_repos_get_git_tags_by_sha_code} \alias{gh_repos_get_git_tags_by_sha_code} \title{Get a Tag.} \usage{ gh_repos_get_git_tags_by_sha_code(owner, repo, shaCode, ...) } \arguments{ \item{owner}{Name of repository owner.} \item{repo...
/man/gh_repos_get_git_tags_by_sha_code.Rd
permissive
ramnathv/gh3
R
false
true
699
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh3.R \name{gh_repos_get_git_tags_by_sha_code} \alias{gh_repos_get_git_tags_by_sha_code} \title{Get a Tag.} \usage{ gh_repos_get_git_tags_by_sha_code(owner, repo, shaCode, ...) } \arguments{ \item{owner}{Name of repository owner.} \item{repo...
setwd( Sys.getenv( "RWD" ) ) machine_specific_replacements <- list( # replace the folder path on macnix c( 'path.expand( \"~\" ) , \"ACS\"' , paste0( '"' , getwd() , '"' ) ) , # change other things in the script to be run c( "hello" , "howdy" ) ) source( lodown::syntaxtractor( "acs2" , replacemen...
/acs2-setup.R
no_license
MonetDB/eanthony
R
false
false
396
r
setwd( Sys.getenv( "RWD" ) ) machine_specific_replacements <- list( # replace the folder path on macnix c( 'path.expand( \"~\" ) , \"ACS\"' , paste0( '"' , getwd() , '"' ) ) , # change other things in the script to be run c( "hello" , "howdy" ) ) source( lodown::syntaxtractor( "acs2" , replacemen...
yh_qda <- function(dfTr, dfTe){ p <- ncol(dfTr)-1 X <- dfTr[,1:p] y <- dfTr[,p+1] Xte <- dfTe[,1:p] yte <- dfTe[,p+1] ans <- MASS::qda(x=X, grouping=y) yh <- predict(ans, newdata=Xte)$class unlist(list(cost=misclassificationrate(yte, yh), pcorr=cor(as.numeric(yte), as.numeric(yh))...
/gencve/R/yh_qda.R
no_license
ingted/R-Examples
R
false
false
327
r
yh_qda <- function(dfTr, dfTe){ p <- ncol(dfTr)-1 X <- dfTr[,1:p] y <- dfTr[,p+1] Xte <- dfTe[,1:p] yte <- dfTe[,p+1] ans <- MASS::qda(x=X, grouping=y) yh <- predict(ans, newdata=Xte)$class unlist(list(cost=misclassificationrate(yte, yh), pcorr=cor(as.numeric(yte), as.numeric(yh))...
# install.packages("pracma") # install.packages("matlib") # install.packages("NlcOptim") library("pracma") library("matlib") # sample data # mosquito count from data y_in <- c( 15, 40, 45, 88, 99, 145, 111, 132, 177, 97, 94, 145, 123, 111, 125, 115, 155, 160, 143, 132, 126, 125, 105, 98, 87, 54, 55, 8 ) # day of...
/inst/optimal-control.R
permissive
travisbyrum/mosqcontrol
R
false
false
52,194
r
# install.packages("pracma") # install.packages("matlib") # install.packages("NlcOptim") library("pracma") library("matlib") # sample data # mosquito count from data y_in <- c( 15, 40, 45, 88, 99, 145, 111, 132, 177, 97, 94, 145, 123, 111, 125, 115, 155, 160, 143, 132, 126, 125, 105, 98, 87, 54, 55, 8 ) # day of...
#' get transitional matrix across all networks #' @param el A list of edge lists for different networks. #' @param allnodes a vector containing unique names of all networks #' @return a sparse transitional matrix #' @examples #' el_list = list(edgelist1, edgelist2, edgelist3) #' allnodes= get_allnodes(el_list) #' Mlis...
/functions/RWR_transitional_matrix.R
permissive
saisaitian/MultiOme
R
false
false
3,066
r
#' get transitional matrix across all networks #' @param el A list of edge lists for different networks. #' @param allnodes a vector containing unique names of all networks #' @return a sparse transitional matrix #' @examples #' el_list = list(edgelist1, edgelist2, edgelist3) #' allnodes= get_allnodes(el_list) #' Mlis...