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(dplyr) shinyUI( fluidPage( titlePanel("DEMO DATA - Military Justice Redesign Metrics - DEMO DATA"), tabsetPanel( tabPanel( title = "Overview", fluidRow(column(3, style="padding-top:50px;", p(strong("This chart shows the average number of days that each stage in t...
/ui.R
permissive
Vintonm49/jag_app
R
false
false
5,700
r
library(dplyr) shinyUI( fluidPage( titlePanel("DEMO DATA - Military Justice Redesign Metrics - DEMO DATA"), tabsetPanel( tabPanel( title = "Overview", fluidRow(column(3, style="padding-top:50px;", p(strong("This chart shows the average number of days that each stage in t...
Sys.setenv(RSTUDIO_PANDOC='/Applications/RStudio.app/Contents/MacOS/pandoc') for (i in unique(salaries$serviceArea)) { rmarkdown::render('rmd/template.Rmd', "github_document", paste("../analysis/", gsub("(\\s)", "", i), ".md", sep = "")) }
/code/reports.R
no_license
chipoglesby/fortCollinsEmployeeEarnings
R
false
false
247
r
Sys.setenv(RSTUDIO_PANDOC='/Applications/RStudio.app/Contents/MacOS/pandoc') for (i in unique(salaries$serviceArea)) { rmarkdown::render('rmd/template.Rmd', "github_document", paste("../analysis/", gsub("(\\s)", "", i), ".md", sep = "")) }
#' A simple function to turn named arguments into a form-encoded string #' @export #' @param \dots arbitrary named arguments that will become part of a form-encoded url. #' @param a something #' @details This function is called in every BigML API function. It helps #' build the URL that requests are forwarded to. It...
/bigml/R/formEncodeURL.R
no_license
ingted/R-Examples
R
false
false
1,955
r
#' A simple function to turn named arguments into a form-encoded string #' @export #' @param \dots arbitrary named arguments that will become part of a form-encoded url. #' @param a something #' @details This function is called in every BigML API function. It helps #' build the URL that requests are forwarded to. It...
library(testthat) context("Prediction error") # {{{ "AUC censored data: order" test_that("AUC censored data: order",{ library(riskRegression) library(survival) library(prodlim) data(Melanoma) setDT(Melanoma) setkey(Melanoma,age) fit <- coxph(Surv(time,status!=0)~invasion+epicel+logthick,data...
/data/genthat_extracted_code/riskRegression/tests/test-AUC.R
no_license
surayaaramli/typeRrh
R
false
false
945
r
library(testthat) context("Prediction error") # {{{ "AUC censored data: order" test_that("AUC censored data: order",{ library(riskRegression) library(survival) library(prodlim) data(Melanoma) setDT(Melanoma) setkey(Melanoma,age) fit <- coxph(Surv(time,status!=0)~invasion+epicel+logthick,data...
prepareData <- function(path){ trade_data <- read.csv(path,header = FALSE) names(trade_data) <- c("Price","Volume","Timestamp","Buy_Sell","Market_Limit","X") trade_data <- trade_data %>% filter(Price!=0) %>% mutate(Time = anytime(Timestamp, tz="UTC", asUTC=TRUE)) %>% select(T...
/prepareData.R
no_license
peteshub/tradedata
R
false
false
810
r
prepareData <- function(path){ trade_data <- read.csv(path,header = FALSE) names(trade_data) <- c("Price","Volume","Timestamp","Buy_Sell","Market_Limit","X") trade_data <- trade_data %>% filter(Price!=0) %>% mutate(Time = anytime(Timestamp, tz="UTC", asUTC=TRUE)) %>% select(T...
# Place the data file "household_power_consumption.txt" in working dirctory file <- "household_power_consumption.txt" data <- read.table(file, sep = ";", na.strings = "?", colClasses = c(rep("character", 2), rep("numeric", 7)), nrows = 2880, skip = 66637) dataH <- read.table(file, sep = ";", na.strings = "?", header = ...
/plot3.R
no_license
kc-chiu/ExData_Plotting1
R
false
false
947
r
# Place the data file "household_power_consumption.txt" in working dirctory file <- "household_power_consumption.txt" data <- read.table(file, sep = ";", na.strings = "?", colClasses = c(rep("character", 2), rep("numeric", 7)), nrows = 2880, skip = 66637) dataH <- read.table(file, sep = ";", na.strings = "?", header = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scale-gradient2n.R \name{scale_colour_gradient2n} \alias{scale_colour_gradient2n} \alias{scale_color_gradient2n} \alias{scale_fill_gradient2n} \title{Colour scales for correlation plot} \usage{ scale_colour_gradient2n(..., colours, midpoint =...
/man/scale_colour.Rd
no_license
xma82/ggcor
R
false
true
5,882
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scale-gradient2n.R \name{scale_colour_gradient2n} \alias{scale_colour_gradient2n} \alias{scale_color_gradient2n} \alias{scale_fill_gradient2n} \title{Colour scales for correlation plot} \usage{ scale_colour_gradient2n(..., colours, midpoint =...
#' @title Calculate the clustering coefficient #' #' @description Calculate the clustering coefficient for an adjacency matrix. #' #' @param mat An adjacency matrix. Calculating the clustering coefficient only makes sense if some connections are zero i.e. no connection. #' #' @return Returns the clustering coeffi...
/R/clustCoef.R
no_license
sqianglan/CeTF
R
false
false
1,605
r
#' @title Calculate the clustering coefficient #' #' @description Calculate the clustering coefficient for an adjacency matrix. #' #' @param mat An adjacency matrix. Calculating the clustering coefficient only makes sense if some connections are zero i.e. no connection. #' #' @return Returns the clustering coeffi...
library(data.table) library(dplyr) library(ggplot2) readData <- function(fileName) { fileList <- dir(path='.', pattern=paste0('^',fileName,'$')) if( length(fileList) != 1) { stop(paste0('Cannot find ', fileName)) } readRDS(fileName) } NEI <- readData('summarySCC_PM25.rd...
/plot6.R
no_license
Bradley-JK-Smith/ExData_Assignment
R
false
false
1,072
r
library(data.table) library(dplyr) library(ggplot2) readData <- function(fileName) { fileList <- dir(path='.', pattern=paste0('^',fileName,'$')) if( length(fileList) != 1) { stop(paste0('Cannot find ', fileName)) } readRDS(fileName) } NEI <- readData('summarySCC_PM25.rd...
library(plotrix) ### Name: draw.ellipse ### Title: Draw ellipse ### Aliases: draw.ellipse ### Keywords: misc ### ** Examples plot(c(0,10), c(0,10), type="n", main="test draw.ellipse") draw.ellipse(c(3,7), c(8,8), c(0.5,1), c(1,0.5), col=c(2,4), angle=c(45,0), segment=rbind(c(0,45),c(45,360))) draw.ellipse(c(3,7), ...
/data/genthat_extracted_code/plotrix/examples/draw.ellipse.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
746
r
library(plotrix) ### Name: draw.ellipse ### Title: Draw ellipse ### Aliases: draw.ellipse ### Keywords: misc ### ** Examples plot(c(0,10), c(0,10), type="n", main="test draw.ellipse") draw.ellipse(c(3,7), c(8,8), c(0.5,1), c(1,0.5), col=c(2,4), angle=c(45,0), segment=rbind(c(0,45),c(45,360))) draw.ellipse(c(3,7), ...
#' \code{RingRoaddata} is a wrapper function used for testing \code{Helske} models. #' #' @param usd standard deviation of speed in mph, a number. #' @param zsd standard deviation of measuring location, a number. # #' @examples # #' #' @export RingRoaddata <- function(usd,zsd) { set.seed(123) start <- 0 end <...
/R/RingRoaddata.R
no_license
PJOssenbruggen/cardlm
R
false
false
3,005
r
#' \code{RingRoaddata} is a wrapper function used for testing \code{Helske} models. #' #' @param usd standard deviation of speed in mph, a number. #' @param zsd standard deviation of measuring location, a number. # #' @examples # #' #' @export RingRoaddata <- function(usd,zsd) { set.seed(123) start <- 0 end <...
library(sarima) ### Name: xarmaFilter ### Title: Applies an extended ARMA filter to a time series ### Aliases: xarmaFilter ### Keywords: ts ### ** Examples m1 <- new("SarimaModel", iorder = 1, siorder = 1, ma = -0.3, sma = -0.1, nseasons = 12) model0 <- modelCoef(m1, "ArmaModel") ## model1 <- filterCoef(model1) mod...
/data/genthat_extracted_code/sarima/examples/xarmaFilter.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,340
r
library(sarima) ### Name: xarmaFilter ### Title: Applies an extended ARMA filter to a time series ### Aliases: xarmaFilter ### Keywords: ts ### ** Examples m1 <- new("SarimaModel", iorder = 1, siorder = 1, ma = -0.3, sma = -0.1, nseasons = 12) model0 <- modelCoef(m1, "ArmaModel") ## model1 <- filterCoef(model1) mod...
# source this file with source('income-tax.R') library(ggplot2) library(reshape2) # parameters defined by government: realparam = list() # INCOME TAX # # all of these sterling amounts are per annum. # you get this much tax free: realparam$personal_allowance <- 11500 # after which you're taxed at the Basic Rate: ...
/income-tax.R
no_license
benclifford/r-income-tax
R
false
false
7,272
r
# source this file with source('income-tax.R') library(ggplot2) library(reshape2) # parameters defined by government: realparam = list() # INCOME TAX # # all of these sterling amounts are per annum. # you get this much tax free: realparam$personal_allowance <- 11500 # after which you're taxed at the Basic Rate: ...
library(equaltestMI) ### Name: eqMI.main ### Title: The main function to test measurement invariance ### Aliases: eqMI.main ### ** Examples ## Not run: ##D data(HolzingerSwineford) ##D semmodel<-' ##D L1 =~ V1 + V2 + V3 ##D L2 =~ V4 + V5 + V6 ##D L3 =~ V7 + V8 ##D L4 =~ V9 + V10 + V11 ##D ' ##D # If raw data are a...
/data/genthat_extracted_code/equaltestMI/examples/eqMI.main.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,335
r
library(equaltestMI) ### Name: eqMI.main ### Title: The main function to test measurement invariance ### Aliases: eqMI.main ### ** Examples ## Not run: ##D data(HolzingerSwineford) ##D semmodel<-' ##D L1 =~ V1 + V2 + V3 ##D L2 =~ V4 + V5 + V6 ##D L3 =~ V7 + V8 ##D L4 =~ V9 + V10 + V11 ##D ' ##D # If raw data are a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.helpers.R \name{icc.simulation.2D.scatter.plot} \alias{icc.simulation.2D.scatter.plot} \title{Creates a scatter plot of ICC vs one variable, ICC on y-axis.} \usage{ icc.simulation.2D.scatter.plot(icc.dt, var.to.plot, plot.mean = T) } \ar...
/man/icc.simulation.2D.scatter.plot.Rd
no_license
mattmoo/SteppedWedgeAnalysis
R
false
true
715
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.helpers.R \name{icc.simulation.2D.scatter.plot} \alias{icc.simulation.2D.scatter.plot} \title{Creates a scatter plot of ICC vs one variable, ICC on y-axis.} \usage{ icc.simulation.2D.scatter.plot(icc.dt, var.to.plot, plot.mean = T) } \ar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/unnest.R \name{dt_unnest} \alias{dt_unnest} \title{Unnest: Fast Unnesting of Data Tables} \usage{ dt_unnest(dt_, col, ...) } \arguments{ \item{dt_}{the data table to unnest} \item{col}{the column to unnest} \item{...}{any of the other varia...
/fuzzedpackages/tidyfast/man/dt_unnest.Rd
no_license
akhikolla/testpackages
R
false
true
745
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/unnest.R \name{dt_unnest} \alias{dt_unnest} \title{Unnest: Fast Unnesting of Data Tables} \usage{ dt_unnest(dt_, col, ...) } \arguments{ \item{dt_}{the data table to unnest} \item{col}{the column to unnest} \item{...}{any of the other varia...
library(ggbiplot) library(arules) library('Hmisc') library("ggpubr") library(sva) library(limma) library(plyr) library("caret") library('doParallel') library('data.table') cl <- makeCluster(4) registerDoParallel(cl) require("VennDiagram") library(devtools) require(ggplot2) install_github("GabrielHoffman/variancePartit...
/functionsSLE.R
no_license
SaraYones/AML_GE_Project2019
R
false
false
14,153
r
library(ggbiplot) library(arules) library('Hmisc') library("ggpubr") library(sva) library(limma) library(plyr) library("caret") library('doParallel') library('data.table') cl <- makeCluster(4) registerDoParallel(cl) require("VennDiagram") library(devtools) require(ggplot2) install_github("GabrielHoffman/variancePartit...
\name{tinyMCE} \alias{tinyMCE} \title{tinyMCE editor element} \usage{ tinyMCE(inputId, content, options = NULL) } \arguments{ \item{inputId}{id associated with the editor} \item{content}{editor content. May be a string or HTML embedded in an \code{\link{HTML}} function} \item{options}{string containing tinyMC...
/man/tinyMCE.Rd
permissive
mul118/shinyMCE
R
false
false
832
rd
\name{tinyMCE} \alias{tinyMCE} \title{tinyMCE editor element} \usage{ tinyMCE(inputId, content, options = NULL) } \arguments{ \item{inputId}{id associated with the editor} \item{content}{editor content. May be a string or HTML embedded in an \code{\link{HTML}} function} \item{options}{string containing tinyMC...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redist_constr.R \name{print.redist_constr} \alias{print.redist_constr} \title{Generic to print redist_constr} \usage{ \method{print}{redist_constr}(x, header = TRUE, details = TRUE, ...) } \arguments{ \item{x}{redist_constr} \item...
/man/print.redist_constr.Rd
no_license
cran/redist
R
false
true
610
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redist_constr.R \name{print.redist_constr} \alias{print.redist_constr} \title{Generic to print redist_constr} \usage{ \method{print}{redist_constr}(x, header = TRUE, details = TRUE, ...) } \arguments{ \item{x}{redist_constr} \item...
\name{PerMANOVA.Simple} \alias{PerMANOVA.Simple} %- Also NEED an '\alias' for EACH other topic documented here. \title{PERMANOVA from distancies matrix %% ~~function to do ... ~~ } \description{This function makes a PERMANOVA from distancies matrix and factor for groups. %% ~~ A concise (1-5 lines) description of wha...
/man/PerMANOVA.Simple.Rd
no_license
laura20vg/permanova
R
false
false
2,680
rd
\name{PerMANOVA.Simple} \alias{PerMANOVA.Simple} %- Also NEED an '\alias' for EACH other topic documented here. \title{PERMANOVA from distancies matrix %% ~~function to do ... ~~ } \description{This function makes a PERMANOVA from distancies matrix and factor for groups. %% ~~ A concise (1-5 lines) description of wha...
library(testthat) library(Biobase) # setup expression sets pdata <- data.frame(col1 = letters[1:5], col2 = rep('mouse', 5), row.names = paste0('SAMPLE', 1:5)) mat <- matrix(rnorm(50), ncol = 5, dimnames = list(1:10, paste0('SAMPLE', 1:5))) fdata <- data.frame(SYMBOL = c('a', 'a', 'b', 'b', letters[3:8]), PROBE = 1:1...
/tests/testthat/test-which_max_iqr.R
no_license
alexvpickering/crossmeta
R
false
false
764
r
library(testthat) library(Biobase) # setup expression sets pdata <- data.frame(col1 = letters[1:5], col2 = rep('mouse', 5), row.names = paste0('SAMPLE', 1:5)) mat <- matrix(rnorm(50), ncol = 5, dimnames = list(1:10, paste0('SAMPLE', 1:5))) fdata <- data.frame(SYMBOL = c('a', 'a', 'b', 'b', letters[3:8]), PROBE = 1:1...
# 12/4/2015 #**************************************************************************************************** # Overview #### #**************************************************************************************************** # Purpose: construct a single state-local government finance file with...
/DataConversionPrograms/bdata_census_slgfin_annual.r
no_license
andwax/bdata
R
false
false
20,929
r
# 12/4/2015 #**************************************************************************************************** # Overview #### #**************************************************************************************************** # Purpose: construct a single state-local government finance file with...
#psds -- are _1 1 to 100 #psds -- are _1 101 to end # extract each data frame separately. psd_cal_ch1_1 = psds[[1]] psd_cal_ch2_1 = psds[[2]] psd_cal_ch3_1 = psds[[3]] psd_cal_ch4_1 = psds[[4]] psd_med_ch1_1 = psds[[5]] psd_med_ch2_1 = psds[[6]] psd_med_ch3_1 = psds[[7]] psd_med_ch4_1 = psds[[8]] psd_cal_ch1_2 =...
/stitching Rdatas.R
no_license
HashemiScience/muse_longitudinal
R
false
false
1,360
r
#psds -- are _1 1 to 100 #psds -- are _1 101 to end # extract each data frame separately. psd_cal_ch1_1 = psds[[1]] psd_cal_ch2_1 = psds[[2]] psd_cal_ch3_1 = psds[[3]] psd_cal_ch4_1 = psds[[4]] psd_med_ch1_1 = psds[[5]] psd_med_ch2_1 = psds[[6]] psd_med_ch3_1 = psds[[7]] psd_med_ch4_1 = psds[[8]] psd_cal_ch1_2 =...
# ------ constants ------ kTargetLog <- c("Admin and System Events Report", "User Report without guest", "Bandwidth and Applications Report without guest", "Client Reputation without guest", "List of terminals connected to DataCenter", "Lis...
/programs/common.R
permissive
nnh/utm_management
R
false
false
4,520
r
# ------ constants ------ kTargetLog <- c("Admin and System Events Report", "User Report without guest", "Bandwidth and Applications Report without guest", "Client Reputation without guest", "List of terminals connected to DataCenter", "Lis...
.fitSeg1 <- function( ### fit a segmented relationship according to eq 1b of Barr13 x , y , n = length(x) , nBootSegmented = 3 ) { # check upstream once instead of in each loop # if (!requireNamespace("segmented")) stop( # "functionality is only supported if segmented package is installed.") xr <- -x...
/R/EddyUStarFilterChangePointDetection.R
no_license
bgctw/REddyProc
R
false
false
7,250
r
.fitSeg1 <- function( ### fit a segmented relationship according to eq 1b of Barr13 x , y , n = length(x) , nBootSegmented = 3 ) { # check upstream once instead of in each loop # if (!requireNamespace("segmented")) stop( # "functionality is only supported if segmented package is installed.") xr <- -x...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_bizsubcats.R \name{get_bizsubcats} \alias{get_bizsubcats} \title{Implements the Acquire Business Subcategory Master API.} \usage{ get_bizsubcats(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en") } \arguments{ \item{api_key}{strin...
/man/get_bizsubcats.Rd
permissive
gmlang/RGurunavi
R
false
true
883
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_bizsubcats.R \name{get_bizsubcats} \alias{get_bizsubcats} \title{Implements the Acquire Business Subcategory Master API.} \usage{ get_bizsubcats(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en") } \arguments{ \item{api_key}{strin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/organizations.R \name{organizations} \alias{organizations} \title{Finds the names of organizations in the input text} \usage{ organizations(text, version = NULL, ...) } \arguments{ \item{text}{text for analysis} \item{version}{for api versio...
/man/organizations.Rd
permissive
imanojkumar/IndicoIo-R
R
false
true
882
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/organizations.R \name{organizations} \alias{organizations} \title{Finds the names of organizations in the input text} \usage{ organizations(text, version = NULL, ...) } \arguments{ \item{text}{text for analysis} \item{version}{for api versio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_predictions.R \name{train_model} \alias{train_model} \title{Train Model} \usage{ train_model(model, x_train, y_train, batch_size = 32, epochs = 10, model_fp) } \arguments{ \item{model}{A Keras neural network model} \item{x_train}{A matr...
/MicroMetabolism/man/train_model.Rd
permissive
thackmann/MicroMetabolism
R
false
true
813
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_predictions.R \name{train_model} \alias{train_model} \title{Train Model} \usage{ train_model(model, x_train, y_train, batch_size = 32, epochs = 10, model_fp) } \arguments{ \item{model}{A Keras neural network model} \item{x_train}{A matr...
gomp.path <- function(target, dataset, xstand = TRUE, tol = c(4, 5, 6), test = "testIndLogistic", method = "ar2" ) { tic <- proc.time() mod <- MXM::gomp(target, dataset, xstand = xstand, tol = min(tol), test = test, method = method) sel <- mod$res[, 1] crit <- mod$res[, 2] dm <- dim(mod$res)[1] r...
/R/gomp.path.R
no_license
cran/MXM
R
false
false
961
r
gomp.path <- function(target, dataset, xstand = TRUE, tol = c(4, 5, 6), test = "testIndLogistic", method = "ar2" ) { tic <- proc.time() mod <- MXM::gomp(target, dataset, xstand = xstand, tol = min(tol), test = test, method = method) sel <- mod$res[, 1] crit <- mod$res[, 2] dm <- dim(mod$res)[1] r...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barentswatch_customApi.R \name{barentswatch_customApi} \alias{barentswatch_customApi} \title{Get custom API request string} \usage{ barentswatch_customApi(request) } \arguments{ \item{request}{Request string} } \description{ Type in your own ...
/man/barentswatch_customApi.Rd
no_license
lynuhs/BarentsWatchR
R
false
true
382
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barentswatch_customApi.R \name{barentswatch_customApi} \alias{barentswatch_customApi} \title{Get custom API request string} \usage{ barentswatch_customApi(request) } \arguments{ \item{request}{Request string} } \description{ Type in your own ...
context("ModelMultiplexer") test_that("makeModelMultiplexerParamSet works", { bls = list( makeLearner("classif.ksvm"), makeLearner("classif.randomForest") ) lrn = makeModelMultiplexer(bls) ps1 = makeModelMultiplexerParamSet(lrn, makeNumericParam("sigma", lower = -10, upper = 10, trafo = function...
/tests/testthat/test_tune_ModelMultiplexer.R
no_license
pjpan/mlr
R
false
false
4,554
r
context("ModelMultiplexer") test_that("makeModelMultiplexerParamSet works", { bls = list( makeLearner("classif.ksvm"), makeLearner("classif.randomForest") ) lrn = makeModelMultiplexer(bls) ps1 = makeModelMultiplexerParamSet(lrn, makeNumericParam("sigma", lower = -10, upper = 10, trafo = function...
# This script allows us to fit the data to a GP by dropping X5 setwd('~/Documents/STAT-Project/') #change it the appropriate path set.seed(150) source("dace.sim.r") source("sampler.r") #---------------------Parameters------------------------ filename = 'data.csv' N = 40 # no. of samples maxIter = 20000 #max. iteratio...
/fit_gp_dropx5.r
no_license
sbrsarkar/sensitivity_analysis
R
false
false
5,733
r
# This script allows us to fit the data to a GP by dropping X5 setwd('~/Documents/STAT-Project/') #change it the appropriate path set.seed(150) source("dace.sim.r") source("sampler.r") #---------------------Parameters------------------------ filename = 'data.csv' N = 40 # no. of samples maxIter = 20000 #max. iteratio...
# Linear Regression to Predict MPG #import libraries library(dplyr) #read file MechaCarData <- read.csv(file='MechaCar_mpg.csv',check.names=F,stringsAsFactors=F) #create linear regression lm(mpg ~ vehicle_length + vehicle_weight + spoiler_angle + ground_clearance + AWD,data=MechaCarData) #create summary ...
/MechaCarChallenge.R
no_license
mleggett25/MechaCar_Statistical_Analysis
R
false
false
1,466
r
# Linear Regression to Predict MPG #import libraries library(dplyr) #read file MechaCarData <- read.csv(file='MechaCar_mpg.csv',check.names=F,stringsAsFactors=F) #create linear regression lm(mpg ~ vehicle_length + vehicle_weight + spoiler_angle + ground_clearance + AWD,data=MechaCarData) #create summary ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iam_operations.R \name{iam_put_role_policy} \alias{iam_put_role_policy} \title{Adds or updates an inline policy document that is embedded in the specified IAM role} \usage{ iam_put_role_policy(RoleName, PolicyName, PolicyDocument) } \argument...
/cran/paws.security.identity/man/iam_put_role_policy.Rd
permissive
johnnytommy/paws
R
false
true
3,713
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iam_operations.R \name{iam_put_role_policy} \alias{iam_put_role_policy} \title{Adds or updates an inline policy document that is embedded in the specified IAM role} \usage{ iam_put_role_policy(RoleName, PolicyName, PolicyDocument) } \argument...
install.packages(c("CORElearn","e1071","ggplot2","GGally","ISLR","class","boot","glmnet","tree","caret","kernlab","klaR","C50","treebag","randomForest","gbm","rpart.plot","ROCR")) #Exercise #Visualize the data set Titanic summary(Titanic) str(Titanic) new_Titanic <- data.frame(Titanic) str(new_Titanic) plot(new_Tita...
/Modeling/Day1.R
no_license
YvYh/Modeling
R
false
false
527
r
install.packages(c("CORElearn","e1071","ggplot2","GGally","ISLR","class","boot","glmnet","tree","caret","kernlab","klaR","C50","treebag","randomForest","gbm","rpart.plot","ROCR")) #Exercise #Visualize the data set Titanic summary(Titanic) str(Titanic) new_Titanic <- data.frame(Titanic) str(new_Titanic) plot(new_Tita...
################################################################################################################################################## ################################################################################################################################################## # Study/Practice R Basics ...
/wine_datatset_statistical_analysis/wine_dataset_deepdive.R
no_license
ezugo/Machine-Learning
R
false
false
7,753
r
################################################################################################################################################## ################################################################################################################################################## # Study/Practice R Basics ...
source("functions.R") # 7326 h5n1 big fasttree ls.gsgd <- tagExtra( "./clade/raw/pH5_7326_e0823.tre" ) ls.gsgd.wo2344 <- ls.gsgd$id[ which( ls.gsgd$tag == "00ff00" ) ] leafEx( "./clade/raw/trim_pH5_7326_3.fasta", ls.gsgd.wo2344 ) rmDup( "./clade/raw/trim_pH5_7326_3_4543.fasta", rmdup = TRUE) rmdup_plus( "./cl...
/h5n1/all_h5n1/all_h5n1.R
no_license
yaotli/Packaging_Type
R
false
false
2,322
r
source("functions.R") # 7326 h5n1 big fasttree ls.gsgd <- tagExtra( "./clade/raw/pH5_7326_e0823.tre" ) ls.gsgd.wo2344 <- ls.gsgd$id[ which( ls.gsgd$tag == "00ff00" ) ] leafEx( "./clade/raw/trim_pH5_7326_3.fasta", ls.gsgd.wo2344 ) rmDup( "./clade/raw/trim_pH5_7326_3_4543.fasta", rmdup = TRUE) rmdup_plus( "./cl...
#################################### #importing the data and cleanig it #################################### #sets the working directory setwd("/Users/alineguilloux/Documents/DataScienceCoursera/4Exploratory") #saves a link to the file and dowloads it link<-c("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fho...
/Plot1.R
no_license
alineguilloux/Project1
R
false
false
1,276
r
#################################### #importing the data and cleanig it #################################### #sets the working directory setwd("/Users/alineguilloux/Documents/DataScienceCoursera/4Exploratory") #saves a link to the file and dowloads it link<-c("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fho...
# Original Matrix eQTL by Andrey A. Shabalin # http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/ # Modified for local analysis # http://cran.r-project.org/web/packages/policies.html #' @title Efficient eQTL Mapping with Local Ancestry #' #' @description \code{LAMatrix_main} is used to perform eQTL mapping...
/LAMatrix.Rcheck/00_pkg_src/LAMatrix/R/LAMatrix.R
no_license
yizhenzhong/Local_ancestry
R
false
false
39,157
r
# Original Matrix eQTL by Andrey A. Shabalin # http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/ # Modified for local analysis # http://cran.r-project.org/web/packages/policies.html #' @title Efficient eQTL Mapping with Local Ancestry #' #' @description \code{LAMatrix_main} is used to perform eQTL mapping...
#!/usr/bin/env Rscript suppressPackageStartupMessages(library("optparse")); suppressPackageStartupMessages(library("RMySQL")) suppressPackageStartupMessages(library("biomaRt")); suppressPackageStartupMessages(library("plyr")); suppressPackageStartupMessages(library("dplyr")); suppressPackageStartupMessages(library("ti...
/sv_callers/integrateOncofuse.R
no_license
jrflab/modules
R
false
false
9,534
r
#!/usr/bin/env Rscript suppressPackageStartupMessages(library("optparse")); suppressPackageStartupMessages(library("RMySQL")) suppressPackageStartupMessages(library("biomaRt")); suppressPackageStartupMessages(library("plyr")); suppressPackageStartupMessages(library("dplyr")); suppressPackageStartupMessages(library("ti...
#first load the dplyr library into r workarea library(dplyr) #create a folder to download the file filename <- "Coursera_DS3_Final.zip" # Checking if archieve already exists. if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" dow...
/run_analysis.R
no_license
NadeekaKiringoda/Getting-and-Cleaning-Data-Course-Project
R
false
false
2,565
r
#first load the dplyr library into r workarea library(dplyr) #create a folder to download the file filename <- "Coursera_DS3_Final.zip" # Checking if archieve already exists. if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" dow...
### behavior lists ## MR based on minute data, put unassigned to non existing entries ## note the Arousal and urinate seem to be never picked up by software B24_ori <- read_csv("C:/Users/cogneuro/Desktop/HCS_analysis/Rcode/24_ori.csv") b20min_sum <- read_csv("C:/Users/cogneuro/Desktop/HCS_analysis/Rcode/behav20min...
/analysis/Rcode/Get_beh_grouping.R
permissive
dscun/HCS_analysis
R
false
false
1,072
r
### behavior lists ## MR based on minute data, put unassigned to non existing entries ## note the Arousal and urinate seem to be never picked up by software B24_ori <- read_csv("C:/Users/cogneuro/Desktop/HCS_analysis/Rcode/24_ori.csv") b20min_sum <- read_csv("C:/Users/cogneuro/Desktop/HCS_analysis/Rcode/behav20min...
# Fonction noyau polynomiale K K <- function(xi, x) { return ((xi * x + 1)^2) } # Fonction d'apprentissage g(x) g <- function(model,obs,x) { n = length(x) # Abscisses r = c(1:n) # Creation de l'array des ordonnees for (i in 1:n) { # Calcul de g(x) pour chaque abscisse x[i] r[i] <- model$coefs[...
/sy19_tp04/sample_code/ex3_codeR2.R
no_license
ahars/sy19
R
false
false
652
r
# Fonction noyau polynomiale K K <- function(xi, x) { return ((xi * x + 1)^2) } # Fonction d'apprentissage g(x) g <- function(model,obs,x) { n = length(x) # Abscisses r = c(1:n) # Creation de l'array des ordonnees for (i in 1:n) { # Calcul de g(x) pour chaque abscisse x[i] r[i] <- model$coefs[...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/linear_regression.R \name{linear_regression} \alias{linear_regression} \title{linear_regression} \usage{ linear_regression(X, y) } \arguments{ \item{X}{input X, it should be a data.frame object with/without colnames.} \item{y}{input y, this ...
/man/linear_regression.Rd
no_license
keyuchen886/OLSregression
R
false
true
1,045
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/linear_regression.R \name{linear_regression} \alias{linear_regression} \title{linear_regression} \usage{ linear_regression(X, y) } \arguments{ \item{X}{input X, it should be a data.frame object with/without colnames.} \item{y}{input y, this ...
#' @title Approximate effective sample size from GWAS of related samples #' @param raf vector of reference (or minor) allele frequencies for all SNPs in the GWAS #' @param seB vector of standard errors of SNP effect estimates, in same order as SNPs in raf #' @param Vy trait variance; default is 1 under assumption trait...
/R/Neffective.R
no_license
jennasimit/flashfm-tmp
R
false
false
3,922
r
#' @title Approximate effective sample size from GWAS of related samples #' @param raf vector of reference (or minor) allele frequencies for all SNPs in the GWAS #' @param seB vector of standard errors of SNP effect estimates, in same order as SNPs in raf #' @param Vy trait variance; default is 1 under assumption trait...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/terrain_analysis.R \name{wbt_multiscale_std_dev_normals} \alias{wbt_multiscale_std_dev_normals} \title{Multiscale std dev normals} \usage{ wbt_multiscale_std_dev_normals( dem, out_mag, out_scale, min_scale = 1, step = 1, num_steps...
/man/wbt_multiscale_std_dev_normals.Rd
permissive
dondealban/whiteboxR
R
false
true
1,207
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/terrain_analysis.R \name{wbt_multiscale_std_dev_normals} \alias{wbt_multiscale_std_dev_normals} \title{Multiscale std dev normals} \usage{ wbt_multiscale_std_dev_normals( dem, out_mag, out_scale, min_scale = 1, step = 1, num_steps...
#Liner Regression on Kaggle DataSet stud_mat <- read.csv("student-mat.csv", sep = ";") head(stud_mat) summary(stud_mat) str(stud_mat) #Check if dataset has null value any(is.na(stud_mat)) library(ggplot2) library(ggthemes) library(dplyr) library(corrgram) library(corrplot) num_cols <- sapply(stud_mat,is.numeric) cor_d...
/LinearRegressionOnKaggleDataSet.R
no_license
abhi117a/R
R
false
false
855
r
#Liner Regression on Kaggle DataSet stud_mat <- read.csv("student-mat.csv", sep = ";") head(stud_mat) summary(stud_mat) str(stud_mat) #Check if dataset has null value any(is.na(stud_mat)) library(ggplot2) library(ggthemes) library(dplyr) library(corrgram) library(corrplot) num_cols <- sapply(stud_mat,is.numeric) cor_d...
#' @import graphics #' @import rngtools #' @import digest #' @import stringr #' @import stats #' @import methods NULL #library(digest) #' Defunct Functions and Classes in the NMF Package #' #' @name NMF-defunct #' @rdname NMF-defunct NULL #' Deprecated Functions in the Package NMF #' #' @param object an R object #'...
/R/nmf-package.R
no_license
cran/NMF
R
false
false
4,578
r
#' @import graphics #' @import rngtools #' @import digest #' @import stringr #' @import stats #' @import methods NULL #library(digest) #' Defunct Functions and Classes in the NMF Package #' #' @name NMF-defunct #' @rdname NMF-defunct NULL #' Deprecated Functions in the Package NMF #' #' @param object an R object #'...
# Last updated: 29 May 2019 # # This file accompanies the paper "Identification of clusters of multimorbid patients in UK general practice: a latent class analysis." setwd("C:\\MM_proc_data\\ffdb") # LIBRARIES # #**********************************************************************# source('C:\\MMcluster\\c...
/code_load_variables2012.R
no_license
Kiddle-group/multimorbidityClustersCPRD-GOLD
R
false
false
63,958
r
# Last updated: 29 May 2019 # # This file accompanies the paper "Identification of clusters of multimorbid patients in UK general practice: a latent class analysis." setwd("C:\\MM_proc_data\\ffdb") # LIBRARIES # #**********************************************************************# source('C:\\MMcluster\\c...
## Gather features from all stars and combine them in a data.frame ## ## Read what we were provided d.clean <- read.table(file.path("..", "data", "raw", "Data_Batch1.txt"), skip = 13, sep = ",") names(d.clean) <- c("ID","magnitude","Cadence","duration","latitude","longitude", ...
/src/summary.R
no_license
lvcl17/TASOC-Stellar-classification
R
false
false
2,486
r
## Gather features from all stars and combine them in a data.frame ## ## Read what we were provided d.clean <- read.table(file.path("..", "data", "raw", "Data_Batch1.txt"), skip = 13, sep = ",") names(d.clean) <- c("ID","magnitude","Cadence","duration","latitude","longitude", ...
source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R") source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R") reps<-50 outerreps<-1000 size<-rev(round(10^seq(2, 5, 0.25)))[ 7 ] nc<-12 plan(strategy=multisession, workers=nc) map(rev(1:outerreps), function(x){ start<-Sys.time() out<-checkpl...
/scripts/checkplots_for_parallel_amarel/asy_563.R
no_license
dushoff/diversity_metrics
R
false
false
535
r
source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R") source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R") reps<-50 outerreps<-1000 size<-rev(round(10^seq(2, 5, 0.25)))[ 7 ] nc<-12 plan(strategy=multisession, workers=nc) map(rev(1:outerreps), function(x){ start<-Sys.time() out<-checkpl...
#' @title Visualize a correlation matrix using mixed methods #' #' @param corr a correlation matrix to be visualized #' @param upper a character indicating the visualization method of the upper triangular matrix to be used. Currently, it supports four methods, named \code{"circle"} (default), \code{"square"}, \code{"el...
/R/ggcorrplot.mixed.R
permissive
caijun/ggcorrplot2
R
false
false
7,481
r
#' @title Visualize a correlation matrix using mixed methods #' #' @param corr a correlation matrix to be visualized #' @param upper a character indicating the visualization method of the upper triangular matrix to be used. Currently, it supports four methods, named \code{"circle"} (default), \code{"square"}, \code{"el...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/charting_points.R \name{mcp_points} \alias{mcp_points} \title{Detail Point-by-Point Tennis Matches} \format{A data frame with 670,790 rows and 68 variables} \source{ \url{https://github.com/JeffSackmann/tennis_MatchChartingProject} } \descri...
/man/mcp_points.Rd
no_license
kvanallen/deuce
R
false
true
3,254
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/charting_points.R \name{mcp_points} \alias{mcp_points} \title{Detail Point-by-Point Tennis Matches} \format{A data frame with 670,790 rows and 68 variables} \source{ \url{https://github.com/JeffSackmann/tennis_MatchChartingProject} } \descri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rtemisInit.R \name{intro} \alias{intro} \title{\code{rtemis-internals}: \code{intro}} \usage{ intro( message = NULL, verbose = TRUE, as.message = FALSE, color = silver, logFile = NULL, call.depth = 1, newline.pre = FALSE ) } \de...
/man/intro.Rd
no_license
DrRoad/rtemis
R
false
true
587
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rtemisInit.R \name{intro} \alias{intro} \title{\code{rtemis-internals}: \code{intro}} \usage{ intro( message = NULL, verbose = TRUE, as.message = FALSE, color = silver, logFile = NULL, call.depth = 1, newline.pre = FALSE ) } \de...
\alias{gtkHandleBoxGetSnapEdge} \name{gtkHandleBoxGetSnapEdge} \title{gtkHandleBoxGetSnapEdge} \description{Gets the edge used for determining reattachment of the handle box. See \code{\link{gtkHandleBoxSetSnapEdge}}.} \usage{gtkHandleBoxGetSnapEdge(object)} \arguments{\item{\code{object}}{[\code{\link{GtkHandleBox}}] ...
/man/gtkHandleBoxGetSnapEdge.Rd
no_license
cran/RGtk2.10
R
false
false
611
rd
\alias{gtkHandleBoxGetSnapEdge} \name{gtkHandleBoxGetSnapEdge} \title{gtkHandleBoxGetSnapEdge} \description{Gets the edge used for determining reattachment of the handle box. See \code{\link{gtkHandleBoxSetSnapEdge}}.} \usage{gtkHandleBoxGetSnapEdge(object)} \arguments{\item{\code{object}}{[\code{\link{GtkHandleBox}}] ...
wants <- c("rgeos","rgdal","maptools","plyr","raster","RColorBrewer","viridis","ash","spdep","reshape2") has <- wants %in% rownames(installed.packages()) if(any(!has)) install.packages(wants[!has]) has <- wants %in% .packages() for(p in wants[!has]) library(p,character.only = T) out.dir = 'C:/Users/mikeha/Dropbox/Th...
/KBA_evaluation_Dissolve.R
no_license
mikeharfoot/ThreatMapping
R
false
false
23,355
r
wants <- c("rgeos","rgdal","maptools","plyr","raster","RColorBrewer","viridis","ash","spdep","reshape2") has <- wants %in% rownames(installed.packages()) if(any(!has)) install.packages(wants[!has]) has <- wants %in% .packages() for(p in wants[!has]) library(p,character.only = T) out.dir = 'C:/Users/mikeha/Dropbox/Th...
library("devtools") install_github("menon1234/Lab04",build_vignettes=TRUE) library("Lab04") browseVignettes("Lab04")
/vignettetest.R
no_license
menon1234/R-S3-and-QR-Decompostition
R
false
false
120
r
library("devtools") install_github("menon1234/Lab04",build_vignettes=TRUE) library("Lab04") browseVignettes("Lab04")
#' Earth Engine API version #' #' #' @family session management functions #' @return Character. Earth Engine Python API version used to build rgee. #' @export ee_version <- function() { '0.1.270' }
/R/ee_version.R
permissive
anhnguyendepocen/rgee
R
false
false
198
r
#' Earth Engine API version #' #' #' @family session management functions #' @return Character. Earth Engine Python API version used to build rgee. #' @export ee_version <- function() { '0.1.270' }
WriteMat = function(mat,filename) { cat(dim(mat)[1], " ", dim(mat)[2],"\n",file=filename) write.table(mat, file=filename, row.names=FALSE, col.names=FALSE, append=TRUE) } WriteVec = function(vec,filename) { cat(length(vec),"\n",file=filename) write.table(vec, file=filename, row.names=FALSE, col.names=FA...
/R/utilities.R
no_license
tienv/GraphMM
R
false
false
828
r
WriteMat = function(mat,filename) { cat(dim(mat)[1], " ", dim(mat)[2],"\n",file=filename) write.table(mat, file=filename, row.names=FALSE, col.names=FALSE, append=TRUE) } WriteVec = function(vec,filename) { cat(length(vec),"\n",file=filename) write.table(vec, file=filename, row.names=FALSE, col.names=FA...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HP.mod.R \name{entropy.wts} \alias{entropy.wts} \title{Entropy of the rescaled weights relative to uniformity.} \usage{ entropy.wts(w) } \arguments{ \item{w}{A vector of importance weights corresponding to each row of the mixture of ...
/man/entropy.wts.Rd
no_license
cran/strandCet
R
false
true
1,481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HP.mod.R \name{entropy.wts} \alias{entropy.wts} \title{Entropy of the rescaled weights relative to uniformity.} \usage{ entropy.wts(w) } \arguments{ \item{w}{A vector of importance weights corresponding to each row of the mixture of ...
##These functions cache the result of inverting a matrix so the inversion ##need not take up so much computer crunching when the inversion ##is needed often. ##This function takes a matrix and returns a list containing functions ##relevant to the inversion and a data member that will hold NULL or ##the inversion. ...
/cachematrix.R
no_license
underkick/ProgrammingAssignment2
R
false
false
1,024
r
##These functions cache the result of inverting a matrix so the inversion ##need not take up so much computer crunching when the inversion ##is needed often. ##This function takes a matrix and returns a list containing functions ##relevant to the inversion and a data member that will hold NULL or ##the inversion. ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/theme.R \name{test_mejr_theme} \alias{test_mejr_theme} \title{Test theme by printing plots to pdf and viewport} \usage{ test_mejr_theme(w = 6.875, h = 4.5, eplot = list(), mejr = list(), gg = theme(), print = TRUE, with_test_theme = ...
/man/test_mejr_theme.Rd
no_license
cran/ggdistribute
R
false
true
867
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/theme.R \name{test_mejr_theme} \alias{test_mejr_theme} \title{Test theme by printing plots to pdf and viewport} \usage{ test_mejr_theme(w = 6.875, h = 4.5, eplot = list(), mejr = list(), gg = theme(), print = TRUE, with_test_theme = ...
#' Break and Stretch if Multiple Persons per Cell #' #' Look for cells with multiple people and create separate rows for each person. #' #' @param dataframe A dataframe that contains the person variable. #' @param person.var The person variable to be stretched. #' @param sep The separator(s) to search for and break ...
/R/speakerSplit.R
no_license
PsychoAnalytix/qdap
R
false
false
2,134
r
#' Break and Stretch if Multiple Persons per Cell #' #' Look for cells with multiple people and create separate rows for each person. #' #' @param dataframe A dataframe that contains the person variable. #' @param person.var The person variable to be stretched. #' @param sep The separator(s) to search for and break ...
ranlRest <- function(Nexp=500,r=.25) { dump("ranlRest","c:\\statbook\\ranlRest.r") par(mfrow=c(1,1),mar=c(.1,.1,2,1)) pr<-0 plot(c(-1,1),c(-1,1),type="n",xlab="",ylab="",axes=F) lines(x=c(-1,-1,1,1,-1),y=c(-1,1,1,-1,-1),lwd=3) tt<-seq(from=0,to=2*pi,length=100) lines(r*cos(tt),r*sin(tt),lwd=5) x<-c(-1,1) for...
/RcodeData/ranlRest.r
no_license
PepSalehi/advancedstatistics
R
false
false
592
r
ranlRest <- function(Nexp=500,r=.25) { dump("ranlRest","c:\\statbook\\ranlRest.r") par(mfrow=c(1,1),mar=c(.1,.1,2,1)) pr<-0 plot(c(-1,1),c(-1,1),type="n",xlab="",ylab="",axes=F) lines(x=c(-1,-1,1,1,-1),y=c(-1,1,1,-1,-1),lwd=3) tt<-seq(from=0,to=2*pi,length=100) lines(r*cos(tt),r*sin(tt),lwd=5) x<-c(-1,1) for...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sf.R \name{get_x} \alias{get_x} \title{Obtain x coordinates of sf geometry/geometries} \usage{ get_x(g) } \arguments{ \item{g}{an sf geometry} } \description{ Exported for internal reasons. Not intended for general use. }
/man/get_x.Rd
permissive
MhAmine/plotly
R
false
true
300
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sf.R \name{get_x} \alias{get_x} \title{Obtain x coordinates of sf geometry/geometries} \usage{ get_x(g) } \arguments{ \item{g}{an sf geometry} } \description{ Exported for internal reasons. Not intended for general use. }
# Accompanies the book: # Kruschke, J. K. (2014). Doing Bayesian Data Analysis: # A Tutorial with R and JAGS, 2nd Edition. Academic Press / Elsevier. source("DBDA2E-utilities.R") #=============================================================================== genMCMC = function( datFrm , yName="y" , x...
/R/DBDA2Eprograms/Jags-Ymet-Xnom2fac-MrobustHet.R
no_license
wmmurrah/BayesianAnalysis
R
false
false
23,353
r
# Accompanies the book: # Kruschke, J. K. (2014). Doing Bayesian Data Analysis: # A Tutorial with R and JAGS, 2nd Edition. Academic Press / Elsevier. source("DBDA2E-utilities.R") #=============================================================================== genMCMC = function( datFrm , yName="y" , x...
#' Create or extend norm_GR GRanges using Comp_GR GRanges #' #' Add metadata present in GRanges made by comp() function #' (termination count (TC), termination-coverage ratio (TCR), coverage (Cover) #' and priming count (PC)) to GRanges made by normalizing functions (dtcr(), #' slograt(), swinsor(), compdata()). #' #' ...
/R/compdata.R
no_license
sidiropoulos/RNAprobR
R
false
false
3,097
r
#' Create or extend norm_GR GRanges using Comp_GR GRanges #' #' Add metadata present in GRanges made by comp() function #' (termination count (TC), termination-coverage ratio (TCR), coverage (Cover) #' and priming count (PC)) to GRanges made by normalizing functions (dtcr(), #' slograt(), swinsor(), compdata()). #' #' ...
.Random.seed <- c(403L, 10L, -87866274L, 1190237097L, -764392869L, 996765290L, 178426636L, 518108495L, 797634053L, -1897212740L, -998816366L, 1232281229L, -1237404473L, -165572178L, 1895136264L, 81571851L, -1426045719L, 1860019128L, -1822167962L, 2045742337L, -379679853L, 1508609090L, 727413748L, 736247287L, 1...
/McSpatial/R/McSpatial-internal.R
no_license
ingted/R-Examples
R
false
false
8,376
r
.Random.seed <- c(403L, 10L, -87866274L, 1190237097L, -764392869L, 996765290L, 178426636L, 518108495L, 797634053L, -1897212740L, -998816366L, 1232281229L, -1237404473L, -165572178L, 1895136264L, 81571851L, -1426045719L, 1860019128L, -1822167962L, 2045742337L, -379679853L, 1508609090L, 727413748L, 736247287L, 1...
#!/usr/bin/env Rscript # Script to compute global ancestry for each individual # based on local ancestry assignments (msp file). # This script takes as input the msp output file generated # by XGMix: https://github.com/AI-sandbox/XGMix 'Usage: global-ancestry-xgmix.R [-m <msp> -c <chromosome> -o <output>] global...
/scripts/global-ancestry-xgmix.R
permissive
santiago1234/popgene-utils
R
false
false
3,278
r
#!/usr/bin/env Rscript # Script to compute global ancestry for each individual # based on local ancestry assignments (msp file). # This script takes as input the msp output file generated # by XGMix: https://github.com/AI-sandbox/XGMix 'Usage: global-ancestry-xgmix.R [-m <msp> -c <chromosome> -o <output>] global...
### Sunthud Pornprasertmanit & Terrence D. Jorgensen ### Last updated: 27 May 2020 ### DEPRECATED 24 November 2022 ### fit and rotate EFA models in lavaan ## ------------------------------------- ## Exploratory Factor Analysis in lavaan ## ------------------------------------- ##' Analyze Unrotated Exploratory Fa...
/semTools/R/efa.R
no_license
simsem/semTools
R
false
false
27,842
r
### Sunthud Pornprasertmanit & Terrence D. Jorgensen ### Last updated: 27 May 2020 ### DEPRECATED 24 November 2022 ### fit and rotate EFA models in lavaan ## ------------------------------------- ## Exploratory Factor Analysis in lavaan ## ------------------------------------- ##' Analyze Unrotated Exploratory Fa...
# skala # library(psych) nmz <- sveST.6 %>% select(vrij14x01:vrij14x10) %>% var_label() %>% unlist() %>% unname() sveST.6 %>% select(vrij14x01:vrij14x09) %>% mutate_all(recode_98) %>% cor(use = "pairwise.complete.obs") sveST.6 %>% select(vrij14x01:vrij14x09) %>% mutate_all(recode_98) %>%...
/03_1__pomocni_NEP.R
no_license
ipuzek/doktorat.code
R
false
false
2,528
r
# skala # library(psych) nmz <- sveST.6 %>% select(vrij14x01:vrij14x10) %>% var_label() %>% unlist() %>% unname() sveST.6 %>% select(vrij14x01:vrij14x09) %>% mutate_all(recode_98) %>% cor(use = "pairwise.complete.obs") sveST.6 %>% select(vrij14x01:vrij14x09) %>% mutate_all(recode_98) %>%...
varsel.qgcv.linear <- function(mainlm, greedy = FALSE, ...) { processmainlm(m = mainlm) esq <- e ^ 2 n <- length(esq) if (!greedy && p > 9) { warning("greedy changed to TRUE since 2 ^ (p-1) > 100") greedy <- TRUE } allsubsets <- as.matrix(expand.grid(replicate(p - 1, c(FALSE, TRUE), simplify ...
/R/avmutils.R
no_license
tjfarrar/skedastic
R
false
false
61,018
r
varsel.qgcv.linear <- function(mainlm, greedy = FALSE, ...) { processmainlm(m = mainlm) esq <- e ^ 2 n <- length(esq) if (!greedy && p > 9) { warning("greedy changed to TRUE since 2 ^ (p-1) > 100") greedy <- TRUE } allsubsets <- as.matrix(expand.grid(replicate(p - 1, c(FALSE, TRUE), simplify ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.allocation.matrix.R \name{get.allocation.matrix} \alias{get.allocation.matrix} \title{Title} \usage{ get.allocation.matrix(accvar.list, time.units, times, reps = 1) } \arguments{ \item{accvar.list}{} \item{time.units}{} \item{times}{} ...
/man/get.allocation.matrix.Rd
no_license
anhnguyendepocen/SMRD
R
false
true
2,341
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.allocation.matrix.R \name{get.allocation.matrix} \alias{get.allocation.matrix} \title{Title} \usage{ get.allocation.matrix(accvar.list, time.units, times, reps = 1) } \arguments{ \item{accvar.list}{} \item{time.units}{} \item{times}{} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/err_tdy.R \name{err_tdy_month} \alias{err_tdy_month} \title{Check and tidy numeric or character vector of months} \usage{ err_tdy_month(x, name) } \arguments{ \item{x}{A numeric or character vector.} \item{name}{The name for \code{x} that wi...
/man/err_tdy_month.Rd
permissive
bayesiandemography/demcheck
R
false
true
779
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/err_tdy.R \name{err_tdy_month} \alias{err_tdy_month} \title{Check and tidy numeric or character vector of months} \usage{ err_tdy_month(x, name) } \arguments{ \item{x}{A numeric or character vector.} \item{name}{The name for \code{x} that wi...
test_that("az account works", { skip_if_not(is_github_actions() | Sys.getenv("LOGNAME") == "max") local_az_account() # only default subscription matters here expect_equal(az_account_show()$name, "subugoe") })
/tests/testthat/test-account.R
permissive
subugoe/AzureAppService
R
false
false
217
r
test_that("az account works", { skip_if_not(is_github_actions() | Sys.getenv("LOGNAME") == "max") local_az_account() # only default subscription matters here expect_equal(az_account_show()$name, "subugoe") })
bus <- read.csv("버스노선별이용현황합계.csv") head(bus) str(bus) busdata <- data.frame(승차인원수=bus$승차인원, 하차인원수=bus$하차인원) head(busdata) busdata2 <- t(busdata) bplot <- barplot(busdata2/1000, ylim=c(0,310), main="서울 주요 마을 버스 이용 승객 현황(2014년 1월)", col=c("green","yellow"), cex.names=0.7, las=2, ylab="이용 승객수(단위:천명)", xlab="노선명", be...
/Rlov/fixedData/bus_script.R
no_license
korea7030/R
R
false
false
693
r
bus <- read.csv("버스노선별이용현황합계.csv") head(bus) str(bus) busdata <- data.frame(승차인원수=bus$승차인원, 하차인원수=bus$하차인원) head(busdata) busdata2 <- t(busdata) bplot <- barplot(busdata2/1000, ylim=c(0,310), main="서울 주요 마을 버스 이용 승객 현황(2014년 1월)", col=c("green","yellow"), cex.names=0.7, las=2, ylab="이용 승객수(단위:천명)", xlab="노선명", be...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22821294525767e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615785008-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
329
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22821294525767e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
setwd("/Users/rudnevav/Documents/Projects/Uveal_melanoma/Results") library("dplyr") library("circlize") library("RColorBrewer") library("wesanderson") library("ComplexHeatmap") library("CNTools") library("ComplexHeatmap") library("dendextend") library("dendsort") library("gplots") library("ggplot2") options(stringsAsFa...
/Oncoprints/MakePrettyOncoprint.R
no_license
VasilisaRudneva/OtherScripts
R
false
false
5,532
r
setwd("/Users/rudnevav/Documents/Projects/Uveal_melanoma/Results") library("dplyr") library("circlize") library("RColorBrewer") library("wesanderson") library("ComplexHeatmap") library("CNTools") library("ComplexHeatmap") library("dendextend") library("dendsort") library("gplots") library("ggplot2") options(stringsAsFa...
library(glmnet) mydata = read.table("./TrainingSet/RF/NSCLC.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="mse",alpha=0.3,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/NSCLC/NSCLC_041.txt',append=TRUE) pri...
/Model/EN/Classifier/NSCLC/NSCLC_041.R
no_license
leon1003/QSMART
R
false
false
346
r
library(glmnet) mydata = read.table("./TrainingSet/RF/NSCLC.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="mse",alpha=0.3,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/NSCLC/NSCLC_041.txt',append=TRUE) pri...
#!/usr/bin/env Rscript library(plumber) pr1 <- plumb('/srv/shiny-server/myRapiv3.R') pr1$run(port=8000, host="0.0.0.0") # Setting the host option on a VM instance ensures the application can be accessed externally. # (This may be only true for Linux users.)
/run-myfile1.R
no_license
smitamondal6/z-Reference-Implementation
R
false
false
257
r
#!/usr/bin/env Rscript library(plumber) pr1 <- plumb('/srv/shiny-server/myRapiv3.R') pr1$run(port=8000, host="0.0.0.0") # Setting the host option on a VM instance ensures the application can be accessed externally. # (This may be only true for Linux users.)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tau_scale.R \name{tau_prior_scale} \alias{tau_prior_scale} \title{Global scale prior scale choice} \usage{ tau_prior_scale(p, D = 1, n = D, sigma = 1) } \arguments{ \item{p}{Expected number of non-zero parameters} \item{D}{Number of paramete...
/man/tau_prior_scale.Rd
no_license
jrnold/bayz
R
false
true
1,004
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tau_scale.R \name{tau_prior_scale} \alias{tau_prior_scale} \title{Global scale prior scale choice} \usage{ tau_prior_scale(p, D = 1, n = D, sigma = 1) } \arguments{ \item{p}{Expected number of non-zero parameters} \item{D}{Number of paramete...
test_that("get_SDA_hydric works", { skip_if_offline() skip_on_cran() # by areasymbol x <- get_SDA_hydric(areasymbols = c("CA077", "CA630")) skip_if(is.null(x)) expect_equal(nrow(x), length(unique(x$mukey))) # check classification of mapunits x.nonhydric <- subset(x, x$HYDRIC_RATING == "N...
/tests/testthat/test-get_SDA_hydric.R
no_license
cran/soilDB
R
false
false
981
r
test_that("get_SDA_hydric works", { skip_if_offline() skip_on_cran() # by areasymbol x <- get_SDA_hydric(areasymbols = c("CA077", "CA630")) skip_if(is.null(x)) expect_equal(nrow(x), length(unique(x$mukey))) # check classification of mapunits x.nonhydric <- subset(x, x$HYDRIC_RATING == "N...
# Using data collected from the accelerometers from the Samsung Galaxy S # smartphone, work with the data and make a clean data set, outputting the # resulting tidy data to a file named "tidy_data.txt". library(dplyr) dataUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" ...
/run_analysis.R
no_license
Qubit13/Getting_and_Cleaning_Data-ProgrammingAssignment
R
false
false
3,195
r
# Using data collected from the accelerometers from the Samsung Galaxy S # smartphone, work with the data and make a clean data set, outputting the # resulting tidy data to a file named "tidy_data.txt". library(dplyr) dataUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" ...
# this file imports all datasources needed # 1. participants data ---------------------------------------------------- sample_data <- read_csv("data/sample_data.csv", col_types = cols()) # 2. other data sources --------------------------------------------------- # here you would import text data from a spread...
/R/00_import.R
no_license
EeethB/tmplt-params-report
R
false
false
1,540
r
# this file imports all datasources needed # 1. participants data ---------------------------------------------------- sample_data <- read_csv("data/sample_data.csv", col_types = cols()) # 2. other data sources --------------------------------------------------- # here you would import text data from a spread...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simpleFormUIFactory.R \name{simpleFormUIFactory} \alias{simpleFormUIFactory} \title{Create simple edit form UI based on data provided by DAO} \usage{ simpleFormUIFactory(dao) } \arguments{ \item{dao}{a Data Access Object (see \code{\link{data...
/man/simpleFormUIFactory.Rd
no_license
ddbs/crudtable
R
false
true
1,174
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simpleFormUIFactory.R \name{simpleFormUIFactory} \alias{simpleFormUIFactory} \title{Create simple edit form UI based on data provided by DAO} \usage{ simpleFormUIFactory(dao) } \arguments{ \item{dao}{a Data Access Object (see \code{\link{data...
credits <- read_csv("C:/Users/Dennis/Downloads/the-movies-dataset/credits.csv") #Actor cleaning MovieStatsChart <- separate(credits, cast, c("1", "2", "3","4", "5","Actor"), sep=', ', remove=TRUE) head(MovieStatsChart) df<-MovieStatsChart %>% select(`Actor`,'id') head(df) df <- separate(df, Actor, c("1", "Actor"), s...
/DennisTranCastCode.R
no_license
hoarika727/CSP571_Movie_Profits_Project
R
false
false
1,439
r
credits <- read_csv("C:/Users/Dennis/Downloads/the-movies-dataset/credits.csv") #Actor cleaning MovieStatsChart <- separate(credits, cast, c("1", "2", "3","4", "5","Actor"), sep=', ', remove=TRUE) head(MovieStatsChart) df<-MovieStatsChart %>% select(`Actor`,'id') head(df) df <- separate(df, Actor, c("1", "Actor"), s...
##===================================== ## Coursera EDA ## Date 16.02.2015 ## Project 2 programming assigment ## PART 1 ##===================================== ##load libraryes library(dplyr) library(plyr) library(data.table) ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC...
/TXT data for upload/EDA-plot1-v1-final.txt
no_license
andcos/Exdata_plotting2
R
false
false
1,469
txt
##===================================== ## Coursera EDA ## Date 16.02.2015 ## Project 2 programming assigment ## PART 1 ##===================================== ##load libraryes library(dplyr) library(plyr) library(data.table) ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/trace_calls.R \name{trace_calls} \alias{trace_calls} \title{trace each call with a srcref attribute} \usage{ trace_calls(x, parent_functions = NULL, parent_ref = NULL) } \arguments{ \item{x}{the call} \item{parent_functions}{the functions wh...
/man/trace_calls.Rd
permissive
r-lib/covr
R
false
true
700
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/trace_calls.R \name{trace_calls} \alias{trace_calls} \title{trace each call with a srcref attribute} \usage{ trace_calls(x, parent_functions = NULL, parent_ref = NULL) } \arguments{ \item{x}{the call} \item{parent_functions}{the functions wh...
## Tests for 'general' infection simulations ## May 27, 2020 test_that("draw_covariate_rows", { df <- data.frame(dog = 4, cat = c("dog", "turtle")) covariate_weights <- c(99, 1) out <- draw_covariate_rows(n = 10, df = df, c...
/tests/testthat/test-simulate_general_outbreaks.R
permissive
skgallagher/InfectionTrees
R
false
false
4,652
r
## Tests for 'general' infection simulations ## May 27, 2020 test_that("draw_covariate_rows", { df <- data.frame(dog = 4, cat = c("dog", "turtle")) covariate_weights <- c(99, 1) out <- draw_covariate_rows(n = 10, df = df, c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_feature_contiguity_constraints.R \name{add_feature_contiguity_constraints} \alias{add_feature_contiguity_constraints} \alias{add_feature_contiguity_constraints,ConservationProblem,ANY,matrix-method} \alias{add_feature_contiguity_constrain...
/man/add_feature_contiguity_constraints.Rd
no_license
diogosbr/prioritizr
R
false
true
10,837
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_feature_contiguity_constraints.R \name{add_feature_contiguity_constraints} \alias{add_feature_contiguity_constraints} \alias{add_feature_contiguity_constraints,ConservationProblem,ANY,matrix-method} \alias{add_feature_contiguity_constrain...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/repijson.R \name{as.ejObject} \alias{as.ejObject} \title{generic as function} \usage{ as.ejObject(x, ...) } \arguments{ \item{x}{an object to convert to repijson} \item{...}{other parameters to pass to the converter} } \description{ generic ...
/man/as.ejObject.Rd
no_license
Hackout2/repijson
R
false
true
335
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/repijson.R \name{as.ejObject} \alias{as.ejObject} \title{generic as function} \usage{ as.ejObject(x, ...) } \arguments{ \item{x}{an object to convert to repijson} \item{...}{other parameters to pass to the converter} } \description{ generic ...
library(GenomicRanges) a = read.delim("allprom.txt") a = subset(a, prom != "p0") a = subset(a, complete.cases(a)) #ga = GRanges(Rle(a$chr), IRanges(start=a$pos, width=1)) #load("gdom0.rda") #load("gdom1.rda") #ov0 = countOverlaps(ga, gdom0) > 0 #ov1 = countOverlaps(ga, gdom1) > 0 #a0 = as.matrix(a[ov0,8:ncol(a)]) #...
/unused/do_clustering.R
no_license
gui11aume/REPLAY_TRIP
R
false
false
1,324
r
library(GenomicRanges) a = read.delim("allprom.txt") a = subset(a, prom != "p0") a = subset(a, complete.cases(a)) #ga = GRanges(Rle(a$chr), IRanges(start=a$pos, width=1)) #load("gdom0.rda") #load("gdom1.rda") #ov0 = countOverlaps(ga, gdom0) > 0 #ov1 = countOverlaps(ga, gdom1) > 0 #a0 = as.matrix(a[ov0,8:ncol(a)]) #...
#!/usr/bin/env Rscript # Autor: Joern Pezoldt (code sections provided by Maria Litovchenko) # 14.08.2018 # Function: #1) QC single scRNA-seq dataset #2) Perform SCENIC with GENIE3 #Libraries library(biomaRt) library(data.table) library(AUCell) library(GENIE3) library(RcisTarget) library(SCENIC) library(Seurat) librar...
/UPDE/scRNAseq/scenic/Old/FAMEAUX_1_scenic_pLN.R
no_license
jpezoldt/UDPE
R
false
false
14,292
r
#!/usr/bin/env Rscript # Autor: Joern Pezoldt (code sections provided by Maria Litovchenko) # 14.08.2018 # Function: #1) QC single scRNA-seq dataset #2) Perform SCENIC with GENIE3 #Libraries library(biomaRt) library(data.table) library(AUCell) library(GENIE3) library(RcisTarget) library(SCENIC) library(Seurat) librar...
library(glmnet) mydata = read.table("./TrainingSet/Correlation/bone.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="mse",alpha=0.05,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/bone/bone_022.txt',append=...
/Model/EN/Correlation/bone/bone_022.R
no_license
leon1003/QSMART
R
false
false
355
r
library(glmnet) mydata = read.table("./TrainingSet/Correlation/bone.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="mse",alpha=0.05,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/bone/bone_022.txt',append=...
### function for breaking up smoothing window with negative sidelobes ### into positive & negative components break_up_sw <- function(sw,patch_with_this=1.0e-10) { neg_guys <- which(sw$sw <= 0) pos_guys <- which(sw$sw > 0) neg_guys_rev <- which(rev(sw$sw) <= 0) pos_guys_rev <- which(rev(sw$sw) > 0) ...
/R-code/break_up_sw.R
no_license
dmn001/sauts
R
false
false
1,229
r
### function for breaking up smoothing window with negative sidelobes ### into positive & negative components break_up_sw <- function(sw,patch_with_this=1.0e-10) { neg_guys <- which(sw$sw <= 0) pos_guys <- which(sw$sw > 0) neg_guys_rev <- which(rev(sw$sw) <= 0) pos_guys_rev <- which(rev(sw$sw) > 0) ...
library(class) source('knnCVk.R') knn.cv1 <- function(x, y) { err0 = 1.0e5 for (k in seq(3, 51, 2)) { err = mean(y != class::knn.cv(x, y, k=k)) if (err <err0) err0 = err } return(err0) } knn.cv_ <- function(x, y, fold) { n = length(y) y = as.factor(y) x = as.ma...
/knnCUT.R
no_license
yingcunXIA/SIStree
R
false
false
1,640
r
library(class) source('knnCVk.R') knn.cv1 <- function(x, y) { err0 = 1.0e5 for (k in seq(3, 51, 2)) { err = mean(y != class::knn.cv(x, y, k=k)) if (err <err0) err0 = err } return(err0) } knn.cv_ <- function(x, y, fold) { n = length(y) y = as.factor(y) x = as.ma...
#Title:Coral reproduction methods #Author: KH Wong #Date Last Modified: 20190102 #See Readme file for details ### Larval Fixation ### #Load Libaries library(dbplyr) library(tidyverse) library(readr) library(stringr) setwd("~/MyProjects/Reproduction_Methods/Data/") #Load Data Prefix <- read_csv("~/MyProjects/Repro...
/Scripts/Fixation_Analysis.R
permissive
kevinhwong1/Reproduction_Methods
R
false
false
2,574
r
#Title:Coral reproduction methods #Author: KH Wong #Date Last Modified: 20190102 #See Readme file for details ### Larval Fixation ### #Load Libaries library(dbplyr) library(tidyverse) library(readr) library(stringr) setwd("~/MyProjects/Reproduction_Methods/Data/") #Load Data Prefix <- read_csv("~/MyProjects/Repro...
#Copyright 2012 The Board of Regents of the University of Wisconsin System. #Contributors: Jason Shao, James McCurdy, Enhai Xie, Adam G.W. Halstead, #Michael H. Whitney, Nathan DiPiazza, Trey K. Sato and Yury V. Bukhman # #This file is part of GCAT. # #GCAT is free software: you can redistribute it and/or modify #it u...
/R/GCAT/R/class.well.R
no_license
amangpt777/GCAT
R
false
false
18,753
r
#Copyright 2012 The Board of Regents of the University of Wisconsin System. #Contributors: Jason Shao, James McCurdy, Enhai Xie, Adam G.W. Halstead, #Michael H. Whitney, Nathan DiPiazza, Trey K. Sato and Yury V. Bukhman # #This file is part of GCAT. # #GCAT is free software: you can redistribute it and/or modify #it u...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 31203 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 31202 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 31202 c c Input Parameter (command line, ...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Sauer-Reimer/ITC99/b20_PR_2_2/b20_PR_2_2.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
717
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 31203 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 31202 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 31202 c c Input Parameter (command line, ...
library(dplyr) library(tidyr) library(ggplot2) library(fjolst) #devtools::install_github('pfrater/fjolstTranslate') library(fjolstTranslate) ## doing spring surveys first stations <- select(translate.stodvar(), sample.id, year, sampling.type) %>% filter(sampling.type %in% c(30, 35)) ## import number of len...
/haddock/initdb/haddockSampleNumbers.R
no_license
inspktrgadget/atlantis
R
false
false
2,814
r
library(dplyr) library(tidyr) library(ggplot2) library(fjolst) #devtools::install_github('pfrater/fjolstTranslate') library(fjolstTranslate) ## doing spring surveys first stations <- select(translate.stodvar(), sample.id, year, sampling.type) %>% filter(sampling.type %in% c(30, 35)) ## import number of len...