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
#!/usr/bin/env Rscript suppressMessages(library(lubridate)) suppressMessages(library(plyr)) suppressMessages(library(tidyr)) suppressMessages(library(dplyr)) suppressMessages(library(stringr)) suppressMessages(library(RODBC)) suppressMessages(library(data.table)) suppressMessages(library(fasttime)) suppressMessages(li...
/main.R
no_license
XavierPrudent/control_tools
R
false
false
1,124
r
#!/usr/bin/env Rscript suppressMessages(library(lubridate)) suppressMessages(library(plyr)) suppressMessages(library(tidyr)) suppressMessages(library(dplyr)) suppressMessages(library(stringr)) suppressMessages(library(RODBC)) suppressMessages(library(data.table)) suppressMessages(library(fasttime)) suppressMessages(li...
############################################################################################ # Code to visualize the relationship ship between the probability of establishment and # # the selection coefficient for each drug archetype (figure 4) # # ...
/Figure 4/Figure 4.R
no_license
ThieryM95/Drug_resistance_data_and_visualisation
R
false
false
4,786
r
############################################################################################ # Code to visualize the relationship ship between the probability of establishment and # # the selection coefficient for each drug archetype (figure 4) # # ...
#' Bind data.tables by row and column #' #' @description #' Bind multiple data.tables into one row-wise or col-wise. #' #' @param ... data.tables or data.frames to bind #' @param .id If TRUE, an integer column is made as a group id #' @param use.names If TRUE, makes sure column names align #' @param fill If TRUE, fills...
/R/bind.R
permissive
lionel-/tidytable
R
false
false
1,629
r
#' Bind data.tables by row and column #' #' @description #' Bind multiple data.tables into one row-wise or col-wise. #' #' @param ... data.tables or data.frames to bind #' @param .id If TRUE, an integer column is made as a group id #' @param use.names If TRUE, makes sure column names align #' @param fill If TRUE, fills...
## You will need the "miner" package for this. You can install ## it with the commands below: #library(devtools) #install_github("ropenscilabs/miner") library(miner) source("genmaze.R") # functions for generating a maze source("solvemaze.R") # functions to build a maze in the world, and solve it ## First, launch ...
/mazebot.R
permissive
revodavid/minecraft-maze
R
false
false
1,929
r
## You will need the "miner" package for this. You can install ## it with the commands below: #library(devtools) #install_github("ropenscilabs/miner") library(miner) source("genmaze.R") # functions for generating a maze source("solvemaze.R") # functions to build a maze in the world, and solve it ## First, launch ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datashield.admin.R \name{dsadmin.rm_options} \alias{dsadmin.rm_options} \title{Remove all DataSHIELD options} \usage{ dsadmin.rm_options(opal, profile = NULL) } \arguments{ \item{opal}{Opal object or list of opal objects.} \item{profile}{The...
/man/dsadmin.rm_options.Rd
no_license
obiba/opalr
R
false
true
1,446
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datashield.admin.R \name{dsadmin.rm_options} \alias{dsadmin.rm_options} \title{Remove all DataSHIELD options} \usage{ dsadmin.rm_options(opal, profile = NULL) } \arguments{ \item{opal}{Opal object or list of opal objects.} \item{profile}{The...
# test_that("reprex: clipboard input works") # This test was removed: # * Feels like I'm just testing clipr, which seems silly. # * Because clipr and reprex have erected so many safeguards against # clipboard access in a noninteractive session, for CRAN reasons, this test # requires a great deal of gymnasti...
/tests/testthat/test-input.R
permissive
tidyverse/reprex
R
false
false
2,847
r
# test_that("reprex: clipboard input works") # This test was removed: # * Feels like I'm just testing clipr, which seems silly. # * Because clipr and reprex have erected so many safeguards against # clipboard access in a noninteractive session, for CRAN reasons, this test # requires a great deal of gymnasti...
#' @importFrom lexicon available_data make_class <- function(x, ...) { class(x) <- unique(c(..., class(x))) x } #get_sents <- function(x) { # x <- stringi::stri_replace_all_regex(stringi::stri_trans_tolower(x), sent_regex, "") # stringi::stri_split_regex(x, "(?<!\\w\\.\\w.)(?<![A-Z][a-z]\\.)(?<=\\....
/R/utils.R
no_license
MachineLeaning/sentimentr
R
false
false
12,167
r
#' @importFrom lexicon available_data make_class <- function(x, ...) { class(x) <- unique(c(..., class(x))) x } #get_sents <- function(x) { # x <- stringi::stri_replace_all_regex(stringi::stri_trans_tolower(x), sent_regex, "") # stringi::stri_split_regex(x, "(?<!\\w\\.\\w.)(?<![A-Z][a-z]\\.)(?<=\\....
library(ape) testtree <- read.tree("3542_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3542_0_unrooted.txt")
/codeml_files/newick_trees_processed/3542_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("3542_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3542_0_unrooted.txt")
IsingSumLikelihood <- function(graph, thresholds, beta, responses = c(0L,1L)) { stopifnot(isSymmetric(graph)) stopifnot(length(responses)==2) if (any(diag(graph)!=0)) { diag(graph) <- 0 warning("Diagonal set to 0") } N <- nrow(graph) Allstates <- do.call(expand.grid,lapply(1:N,function(x)c(respo...
/IsingSampler/R/Distribution.R
no_license
akhikolla/InformationHouse
R
false
false
1,527
r
IsingSumLikelihood <- function(graph, thresholds, beta, responses = c(0L,1L)) { stopifnot(isSymmetric(graph)) stopifnot(length(responses)==2) if (any(diag(graph)!=0)) { diag(graph) <- 0 warning("Diagonal set to 0") } N <- nrow(graph) Allstates <- do.call(expand.grid,lapply(1:N,function(x)c(respo...
### Author: JMZ ### Modified: 4/1/15 ### Purpose: Initial start of functions that take downloaded MODIS EVI data and organizes them by year and day for analysis. ### The input will be a list of MODIS pixels that we will then analyze ### Known issues: Need to make sure flag files are downloaded, and this file will be a...
/helperFunctions/eviAnalyze.R
no_license
jmzobitz/springPhenology
R
false
false
1,629
r
### Author: JMZ ### Modified: 4/1/15 ### Purpose: Initial start of functions that take downloaded MODIS EVI data and organizes them by year and day for analysis. ### The input will be a list of MODIS pixels that we will then analyze ### Known issues: Need to make sure flag files are downloaded, and this file will be a...
# 'number': if you want a summary for more than S variables local_mfdr <- function(fit, lambda, number=NULL, cutoff=NULL, X=NULL, y=NULL) { # Check for valid args if(!is.null(number) && (number < 1)) stop("'number' should be a positive integer") if(!is.null(cutoff) && (cutoff > 1 | cutoff <= 0)) stop("'cutoff' s...
/R/local-mfdr.R
no_license
yudemeirain/ncvreg
R
false
false
4,508
r
# 'number': if you want a summary for more than S variables local_mfdr <- function(fit, lambda, number=NULL, cutoff=NULL, X=NULL, y=NULL) { # Check for valid args if(!is.null(number) && (number < 1)) stop("'number' should be a positive integer") if(!is.null(cutoff) && (cutoff > 1 | cutoff <= 0)) stop("'cutoff' s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{knnSURF} \alias{knnSURF} \title{knnSURF} \usage{ knnSURF(m.samples, sd.frac = 0.5) } \arguments{ \item{m.samples}{number of samples in data.} \item{sd.frac}{fraction of the standard deviation from the mean of all pairwise dista...
/man/knnSURF.Rd
no_license
Sandy4321/npdr
R
false
true
575
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{knnSURF} \alias{knnSURF} \title{knnSURF} \usage{ knnSURF(m.samples, sd.frac = 0.5) } \arguments{ \item{m.samples}{number of samples in data.} \item{sd.frac}{fraction of the standard deviation from the mean of all pairwise dista...
################################################################################### # IMPORT & PULIZIA # ################################################################################### dati <- read.csv2("C:/Users/Filippo/Desktop/dataset.csv", sep=",") # Pulizia 1 dati <- dati[,-c(1:11,78:79)] # Rinomino...
/dataset_alessandro.R
no_license
alessandro992/RipeStatistica
R
false
false
4,492
r
################################################################################### # IMPORT & PULIZIA # ################################################################################### dati <- read.csv2("C:/Users/Filippo/Desktop/dataset.csv", sep=",") # Pulizia 1 dati <- dati[,-c(1:11,78:79)] # Rinomino...
library(mlr3extralearners) install_learners("surv.coxboost") test_that("surv.coxboost", { learner = lrn("surv.coxboost") fun = CoxBoost::CoxBoost exclude = c("time", # coerced internally "status", # coerced internally "x", # coerced internally "subset", # handled by task...
/inst/paramtest/test_paramtest_CoxBoost_surv_coxboost.R
no_license
whirlsyu/mlr3extralearners
R
false
false
1,244
r
library(mlr3extralearners) install_learners("surv.coxboost") test_that("surv.coxboost", { learner = lrn("surv.coxboost") fun = CoxBoost::CoxBoost exclude = c("time", # coerced internally "status", # coerced internally "x", # coerced internally "subset", # handled by task...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{ScaleMatrics} \alias{ScaleMatrics} \title{Matrics scaling} \usage{ ScaleMatrics(mat, scale.coef, MARGIN) } \arguments{ \item{mat}{A numeric matrix (m * n)} \item{scale.coef}{A numeric factor (m or n)} \item{MARGIN}{An integer:...
/man/ScaleMatrics.Rd
no_license
youngtf/GenoR
R
false
true
1,365
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{ScaleMatrics} \alias{ScaleMatrics} \title{Matrics scaling} \usage{ ScaleMatrics(mat, scale.coef, MARGIN) } \arguments{ \item{mat}{A numeric matrix (m * n)} \item{scale.coef}{A numeric factor (m or n)} \item{MARGIN}{An integer:...
################################################################# # Dashboard header ################################################################# header <- dashboardHeader( titleWidth =270, title = "Avian Stochastic CRM", tags$li(class = "dropdown", actionLink("appvrsn", label = tags$b("v2.2.1")), style ...
/ui.r
no_license
grwhumphries/stochCRM
R
false
false
18,669
r
################################################################# # Dashboard header ################################################################# header <- dashboardHeader( titleWidth =270, title = "Avian Stochastic CRM", tags$li(class = "dropdown", actionLink("appvrsn", label = tags$b("v2.2.1")), style ...
#' weather_data UI Function #' #' @description A shiny Module implementing a request-based #' weather data acquisition service #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_request_weather_ui <- function(id){ ns <- NS(id) tagList( div(...
/front-end/app/mod_request_weather.R
no_license
drkupi/W3S-Hydro
R
false
false
8,417
r
#' weather_data UI Function #' #' @description A shiny Module implementing a request-based #' weather data acquisition service #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_request_weather_ui <- function(id){ ns <- NS(id) tagList( div(...
############################## ############################## ### Survey Bee Hive Losses ### # (c) 2020 Hannes Oberreiter # ############################## ############################## ####### Thymol ########### # Set Working directory (uses API of RStudio) #SCRIPT.DIR <- dirname( rstudioapi::getActiveDocumentContex...
/2020_R_Files/Plot_Treatment_Thymol.R
permissive
HannesOberreiter/coloss_honey_bee_colony_losses_austria
R
false
false
1,751
r
############################## ############################## ### Survey Bee Hive Losses ### # (c) 2020 Hannes Oberreiter # ############################## ############################## ####### Thymol ########### # Set Working directory (uses API of RStudio) #SCRIPT.DIR <- dirname( rstudioapi::getActiveDocumentContex...
# Play with map making library(ggplot2) library(maps) library(dplyr) iowa <- map_data("county") %>% filter(region == "iowa") locs <- readr::read_csv("data-raw/site_locs.csv") ggplot()+ geom_polygon(data = iowa, aes(x = long, y = lat, group = group), color = "black", fill = "white")+ geom_point(...
/data-raw/code_messing.R
no_license
lydiaPenglish/sgVarietyTrials
R
false
false
658
r
# Play with map making library(ggplot2) library(maps) library(dplyr) iowa <- map_data("county") %>% filter(region == "iowa") locs <- readr::read_csv("data-raw/site_locs.csv") ggplot()+ geom_polygon(data = iowa, aes(x = long, y = lat, group = group), color = "black", fill = "white")+ geom_point(...
################################################## # # QMB 6358: Software Tools for Business Analytics # # Merging datasets # # Lealand Morin, Ph.D. # Assistant Professor # Department of Economics # College of Business Administration # University of Central Florida # # September 21, 2020 # #############################...
/demo_09_merging_in_R/merge_examples.R
no_license
LeeMorinUCF/QMB6358F20
R
false
false
1,672
r
################################################## # # QMB 6358: Software Tools for Business Analytics # # Merging datasets # # Lealand Morin, Ph.D. # Assistant Professor # Department of Economics # College of Business Administration # University of Central Florida # # September 21, 2020 # #############################...
# libraries library(pls) pls_regression <- function(covar.matrix, ys, npls) { pls.data <- c() mask <- !is.na(covar.matrix) covar.matrix <- ifelse(mask, covar.matrix, 0) pls.data$X <- covar.matrix pls.data$y <- ys pls.obj <- plsr(y ~ X, ncomp = npls, validation = "none", data = pls.data, na.action = na.fail...
/functions_pls.R
no_license
nancyc9/spatiotemp
R
false
false
3,583
r
# libraries library(pls) pls_regression <- function(covar.matrix, ys, npls) { pls.data <- c() mask <- !is.na(covar.matrix) covar.matrix <- ifelse(mask, covar.matrix, 0) pls.data$X <- covar.matrix pls.data$y <- ys pls.obj <- plsr(y ~ X, ncomp = npls, validation = "none", data = pls.data, na.action = na.fail...
library(leaflet) library(RColorBrewer) library(scales) library(lattice) library(dplyr) library(plotrix) # For pie3D # Leaflet bindings are a bit slow; for now we'll just sample to compensate set.seed(100) #zipdata <- allzips[sample.int(nrow(allzips), 10000),] #zipdata <- allzips[trimws(allzips$AC_WEIGHT) %in% "CLASS 3...
/server.R
no_license
alfredcs/Dockerize-Analytical-Applications-Based-on-R-Shiny-Framework
R
false
false
11,010
r
library(leaflet) library(RColorBrewer) library(scales) library(lattice) library(dplyr) library(plotrix) # For pie3D # Leaflet bindings are a bit slow; for now we'll just sample to compensate set.seed(100) #zipdata <- allzips[sample.int(nrow(allzips), 10000),] #zipdata <- allzips[trimws(allzips$AC_WEIGHT) %in% "CLASS 3...
## This script is created by Jelena Jovanovic (http://jelenajovanovic.net/), ## for LASI'18 Workshop on Text mining for learning content analysis ## (https://solaresearch.org/events/lasi/lasi-2018/lasi18-workshops/) ## The function reads all files from the given folder (infolder) ## into a data frame and returns t...
/UtilityFunctions.R
permissive
yipu-z/Text_Mining_at_LASI18
R
false
false
8,998
r
## This script is created by Jelena Jovanovic (http://jelenajovanovic.net/), ## for LASI'18 Workshop on Text mining for learning content analysis ## (https://solaresearch.org/events/lasi/lasi-2018/lasi18-workshops/) ## The function reads all files from the given folder (infolder) ## into a data frame and returns t...
# $Rev: 12836 $ # $LastChangedDate: 2009-11-01 17:44:04 +0000 (Sun, 01 Nov 2009) $ # $LastChangedBy: fgochez $ ############################################################################### # test.applyDataSubset <- function() { # check whether or not the default subset is applied correctly unitTestPat...
/unittests/runit.subsetting.R
no_license
MarioGS/NMI
R
false
false
2,547
r
# $Rev: 12836 $ # $LastChangedDate: 2009-11-01 17:44:04 +0000 (Sun, 01 Nov 2009) $ # $LastChangedBy: fgochez $ ############################################################################### # test.applyDataSubset <- function() { # check whether or not the default subset is applied correctly unitTestPat...
################################################################################################################ # Obtains current occurrence data in GBIF for a taxonomic list of spiders and two .csv files # containing literature based records for spiders of the Iberian Penninsula and elsewhere. # Calculates extent ...
/GBIF_filter.R
no_license
wangyongcai2016/GBIF_Species
R
false
false
6,433
r
################################################################################################################ # Obtains current occurrence data in GBIF for a taxonomic list of spiders and two .csv files # containing literature based records for spiders of the Iberian Penninsula and elsewhere. # Calculates extent ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Plot4CATA.R \name{PrettyBarPlotColor} \alias{PrettyBarPlotColor} \title{\code{PrettyBarPlotColor}: create pretty bar plots with defined colors for the sigificant columns} \usage{ PrettyBarPlotColor( bootratio, threshold = 2, ylim = NUL...
/man/PrettyBarPlotColor.Rd
no_license
LJWilliams/PTCA4CATA
R
false
true
1,716
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Plot4CATA.R \name{PrettyBarPlotColor} \alias{PrettyBarPlotColor} \title{\code{PrettyBarPlotColor}: create pretty bar plots with defined colors for the sigificant columns} \usage{ PrettyBarPlotColor( bootratio, threshold = 2, ylim = NUL...
# update.packages(ask = FALSE) try(require("shiny")||install.packages("shiny")) try(require("reshape2")||install.packages("reshape2")) try(require("xts")||install.packages("xts")) try(require("devtools")||install.packages("devtools")) library("devtools") try(require("gtrendsR")||install_github("PMassicotte/gtrendsR"))...
/dependency-google-trends.R
no_license
sudhir-voleti/google-trends
R
false
false
478
r
# update.packages(ask = FALSE) try(require("shiny")||install.packages("shiny")) try(require("reshape2")||install.packages("reshape2")) try(require("xts")||install.packages("xts")) try(require("devtools")||install.packages("devtools")) library("devtools") try(require("gtrendsR")||install_github("PMassicotte/gtrendsR"))...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{hallbey} \alias{hallbey} \title{Hall Bey} \format{A matrix, 4 rows by 4 columns} \usage{ hallbey } \description{ A Matrix used as examples in the hallbey explanation of glcms. } \keyword{datasets}
/man/hallbey.Rd
no_license
cran/radiomics
R
false
true
303
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{hallbey} \alias{hallbey} \title{Hall Bey} \format{A matrix, 4 rows by 4 columns} \usage{ hallbey } \description{ A Matrix used as examples in the hallbey explanation of glcms. } \keyword{datasets}
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), trainX ...
/dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609868419-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
1,199
r
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), trainX ...
\name{orders} \alias{orders} \title{ Generic Function - orders } \description{ Generic function } \usage{ orders(object) } \arguments{ \item{object}{ Depending on the class of \code{object} depends on the values used (and if one exists) } } \details{ Generic Function } \value{ Depends on the class of \code{object}...
/man/orders.Rd
no_license
AndreyAkinshin/changepoint-new
R
false
false
558
rd
\name{orders} \alias{orders} \title{ Generic Function - orders } \description{ Generic function } \usage{ orders(object) } \arguments{ \item{object}{ Depending on the class of \code{object} depends on the values used (and if one exists) } } \details{ Generic Function } \value{ Depends on the class of \code{object}...
#' Generate the heatmap (Plotly) #' #' This function is an advanced visualization tool of group level RRs #' obtained from the `zinb_analysis_tool`. It will generate an interactive #' heatmap with each cell representing the #' RR of an AE group with a vaccine. #' #' @param big_data The big data.frame from the `z...
/R/plotly_heatmap.R
no_license
cran/zGPS.AO
R
false
false
555
r
#' Generate the heatmap (Plotly) #' #' This function is an advanced visualization tool of group level RRs #' obtained from the `zinb_analysis_tool`. It will generate an interactive #' heatmap with each cell representing the #' RR of an AE group with a vaccine. #' #' @param big_data The big data.frame from the `z...
# Estimate size of German (speaking) Twitter user population with a # capture recapture design library(ggplot2) # Given a data frame (queried ids, hits, hits_germany, recaptured) get estimated # population size with 95% confidence intervals estimate_population <- function(df) { csums <- colSums(df) n_recap <- ...
/analysis/pop_estimation.R
no_license
flinder/pilot_ptweet
R
false
false
3,320
r
# Estimate size of German (speaking) Twitter user population with a # capture recapture design library(ggplot2) # Given a data frame (queried ids, hits, hits_germany, recaptured) get estimated # population size with 95% confidence intervals estimate_population <- function(df) { csums <- colSums(df) n_recap <- ...
## tXn flagger app============================================================= # metadata--------------------------------------------------------------------- # Author: Aarsh Batra # Date: March 14, 2020 # R version: 3.4.2 (2017-09-28) # libraries and helper files---------------------------------------------------...
/tXnFlagger.R
no_license
AarshBatra/tXnFlagger
R
false
false
2,644
r
## tXn flagger app============================================================= # metadata--------------------------------------------------------------------- # Author: Aarsh Batra # Date: March 14, 2020 # R version: 3.4.2 (2017-09-28) # libraries and helper files---------------------------------------------------...
Request <- setRefClass( 'Request', fields = c('FORM_DATA_MEDIA_TYPES','PARSEABLE_DATA_MEDIA_TYPES','env'), methods = list( initialize = function(env,...){ env <<- env # The set of form-data media-types. Requests that do not indicate # one of the media types presents in this list will not be...
/Rook/R/Request.R
no_license
cadar/rRack
R
false
false
5,635
r
Request <- setRefClass( 'Request', fields = c('FORM_DATA_MEDIA_TYPES','PARSEABLE_DATA_MEDIA_TYPES','env'), methods = list( initialize = function(env,...){ env <<- env # The set of form-data media-types. Requests that do not indicate # one of the media types presents in this list will not be...
library(downloader) library("dplyr") url="https://raw.githubusercontent.com/genomicsclass/dagdata/master/inst/extdata/msleep_ggplot2.csv" filename <- basename(url) download(url,filename) install.packages("dplyr") sleepDat = read.csv("msleep_ggplot2.csv") class(sleepDat) primateSleep = filter(sleepDat, order == "Pri...
/Wk1_dplyr.R
no_license
subsoontornlab/RedX
R
false
false
603
r
library(downloader) library("dplyr") url="https://raw.githubusercontent.com/genomicsclass/dagdata/master/inst/extdata/msleep_ggplot2.csv" filename <- basename(url) download(url,filename) install.packages("dplyr") sleepDat = read.csv("msleep_ggplot2.csv") class(sleepDat) primateSleep = filter(sleepDat, order == "Pri...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 convaqCpp <- function(df1, df2, model_num, qvalues, qvalues_rep, merge, merge_threshold, cutoff, comp1, value1, eq1, type1, comp2, value2, eq2, type2, nthreads) { .Call('_convaq_convaqCpp',...
/R/RcppExports.R
permissive
SimonLarsen/convaq
R
false
false
483
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 convaqCpp <- function(df1, df2, model_num, qvalues, qvalues_rep, merge, merge_threshold, cutoff, comp1, value1, eq1, type1, comp2, value2, eq2, type2, nthreads) { .Call('_convaq_convaqCpp',...
setwd('/Volumes/OSX/Users/pichugin/Projects/Fragmentation with costs/Local simulations/Classes abundance and groups size/True random delay cost 2020/') Write2File=2 # Size of figure pdfSizeX=5 pdfSizeY=5 ## margin parameters Bottom=3.5 Left=4 Top=0.5 Right=0.5 #palette generated by iwanthue CLR_bin <- "#88d08f" C...
/05 Life cycles data analysis/True random/True random delay cost/DelayScanProcessor.R
no_license
yuriypichugin/Costly-fragmentation-life-cycles
R
false
false
8,545
r
setwd('/Volumes/OSX/Users/pichugin/Projects/Fragmentation with costs/Local simulations/Classes abundance and groups size/True random delay cost 2020/') Write2File=2 # Size of figure pdfSizeX=5 pdfSizeY=5 ## margin parameters Bottom=3.5 Left=4 Top=0.5 Right=0.5 #palette generated by iwanthue CLR_bin <- "#88d08f" C...
# setup size matrix dat <- read.csv(here::here('Heeia_crabdata_Apr2019.csv')) (minsize <- min(dat$CWid_LR_mm, na.rm=T)) (maxsize <- max(dat$CWid_LR_mm, na.rm=T)) # Set up size bins up_pts <- seq(minsize+4,maxsize,by=20) mid_pts <- up_pts-10 paste0(mid_pts,up_pts) # Generate size transition probability matrix followin...
/get_size_matrix.R
no_license
mkapur/crab-collab
R
false
false
342
r
# setup size matrix dat <- read.csv(here::here('Heeia_crabdata_Apr2019.csv')) (minsize <- min(dat$CWid_LR_mm, na.rm=T)) (maxsize <- max(dat$CWid_LR_mm, na.rm=T)) # Set up size bins up_pts <- seq(minsize+4,maxsize,by=20) mid_pts <- up_pts-10 paste0(mid_pts,up_pts) # Generate size transition probability matrix followin...
with(a879b3afd2c28422bb8da8e2348c134d8, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/34bb7d35-e1c0-4de5-b378-034f770a7361';rm(list=ls())});
/34bb7d35-e1c0-4de5-b378-034f770a7361/R/Temp/a3v6oBnlBvwtA.R
no_license
ayanmanna8/test
R
false
false
212
r
with(a879b3afd2c28422bb8da8e2348c134d8, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/34bb7d35-e1c0-4de5-b378-034f770a7361';rm(list=ls())});
#' Get Predicted Values from a SARM Model #' #' This function reports predicted values with 95% confidence intervals #' for a model estimated with the sarm() function. By default, it #' generates predicted values with the data used to estimate the model. #' The user may create or use a different dataset, and then ...
/R/predict_sarm.R
no_license
milesdwilliams15/SARM
R
false
false
1,370
r
#' Get Predicted Values from a SARM Model #' #' This function reports predicted values with 95% confidence intervals #' for a model estimated with the sarm() function. By default, it #' generates predicted values with the data used to estimate the model. #' The user may create or use a different dataset, and then ...
library(SuperPCA) ### Name: TensProd ### Title: Compute tensor product over multiple dimensions using Khatri-Rao ### product ### Aliases: TensProd ### ** Examples L <- list(matrix(rnorm(10*10),10,10),matrix(rnorm(10*10),10,10),matrix(rnorm(1000*10),1000,10)) TensProd(L)
/data/genthat_extracted_code/SuperPCA/examples/TensProd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
281
r
library(SuperPCA) ### Name: TensProd ### Title: Compute tensor product over multiple dimensions using Khatri-Rao ### product ### Aliases: TensProd ### ** Examples L <- list(matrix(rnorm(10*10),10,10),matrix(rnorm(10*10),10,10),matrix(rnorm(1000*10),1000,10)) TensProd(L)
## Getting and cleaning data, project 2 ##this script assumes the working directory is the UCI HAR dataset ## load the train and test data xtrain <- read.table("train/X_train.txt") ytrain <- read.table("train/y_train.txt") xtest <- read.table("test/X_test.txt") ytest <- read.table("test/y_test.txt") testsubs <- read....
/run_analysis.R
no_license
dwincoleman/GCDproject2
R
false
false
1,601
r
## Getting and cleaning data, project 2 ##this script assumes the working directory is the UCI HAR dataset ## load the train and test data xtrain <- read.table("train/X_train.txt") ytrain <- read.table("train/y_train.txt") xtest <- read.table("test/X_test.txt") ytest <- read.table("test/y_test.txt") testsubs <- read....
# TOOL no-operation.R: No-op (Empty analysis for testing purposes.)
/tools/misc/R/no-operation.R
permissive
chipster/chipster-tools
R
false
false
68
r
# TOOL no-operation.R: No-op (Empty analysis for testing purposes.)
# Exercise 7: using dplyr on external data # Load the dplyr library library(dplyr) # Use the `read.csv()` function to read in the included data set. Remember to # save it as a variable. team_data <- read.csv("nba_teams_2016.csv") # View the data frame you loaded, and get some basic information about the # number of...
/exercise-7/exercise.R
permissive
aemelialialia/ch10-dplyr
R
false
false
1,720
r
# Exercise 7: using dplyr on external data # Load the dplyr library library(dplyr) # Use the `read.csv()` function to read in the included data set. Remember to # save it as a variable. team_data <- read.csv("nba_teams_2016.csv") # View the data frame you loaded, and get some basic information about the # number of...
#' CRediT Roles #' #' @param display Whether to display the category names, explanations, or abbreviations #' #' @return list of roles #' @export #' #' @examples #' credit_roles() credit_roles <- function(display = c("explain", "names", "abbr")) { roles <- list( "Conceptualization" = "Ideas; formulation or evolut...
/R/credit_roles.R
permissive
scienceverse/scienceverse
R
false
false
2,936
r
#' CRediT Roles #' #' @param display Whether to display the category names, explanations, or abbreviations #' #' @return list of roles #' @export #' #' @examples #' credit_roles() credit_roles <- function(display = c("explain", "names", "abbr")) { roles <- list( "Conceptualization" = "Ideas; formulation or evolut...
# # This test file has been generated by kwb.test::create_test_files() # launched by user hauke on 2018-12-16 07:54:58. # Your are strongly encouraged to modify the dummy functions # so that real cases are tested. You should then delete this comment. # test_that("dir_full_recursive_xml() works", { expect_error( ...
/tests/testthat/test-function-dir_full_recursive_xml.R
permissive
KWB-R/kwb.file
R
false
false
416
r
# # This test file has been generated by kwb.test::create_test_files() # launched by user hauke on 2018-12-16 07:54:58. # Your are strongly encouraged to modify the dummy functions # so that real cases are tested. You should then delete this comment. # test_that("dir_full_recursive_xml() works", { expect_error( ...
testlist <- list(cv1 = c(6.66340319670199e+187, 1.14498026294305e-176, -2.90569833511868e-239, 1.22100882356897e+230, 1.87366938860408e+157, 4.16849208158275e+180, -1.73526854570565e-245, 8.13201217460416e-122, -1.52485268164488e+266, 1.06337525026949e+215, -7.84923789065107e+289, 8.60659473931717e-49, NaN, -1.6963...
/issuestests/metadynminer3d/inst/testfiles/hills3d1p2/hills3d1p2_output/log_6f82006d009b16b8582ae9eb527eb6f157358938/hills3d1p2-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
5,064
r
testlist <- list(cv1 = c(6.66340319670199e+187, 1.14498026294305e-176, -2.90569833511868e-239, 1.22100882356897e+230, 1.87366938860408e+157, 4.16849208158275e+180, -1.73526854570565e-245, 8.13201217460416e-122, -1.52485268164488e+266, 1.06337525026949e+215, -7.84923789065107e+289, 8.60659473931717e-49, NaN, -1.6963...
#' read data from supported file formats #' #' read in data from filepath into R #' #' @param filename a complete file path #' @param \dots additional arguments passed to file-specific methods. #' @export read_data <- function(filename, ...){ UseMethod("read_data") } #' @param filename a filepath to an existing file...
/R/read_data.R
permissive
aappling-usgs/meddle
R
false
false
2,198
r
#' read data from supported file formats #' #' read in data from filepath into R #' #' @param filename a complete file path #' @param \dots additional arguments passed to file-specific methods. #' @export read_data <- function(filename, ...){ UseMethod("read_data") } #' @param filename a filepath to an existing file...
#' Robust EM Algorithm for Gaussian Mixture Models. #' #' Given the prespecified number of clusters, #' the algorithm will calculate the mean and covariance of each cluster. For complete examples #' check out the documentation for robustEM. #' #' @param sampleMat #' All the points in a matrix #' #' @param cluster #' N...
/R/EM_alg_GMM.R
permissive
mkbwang/RobustEM
R
false
false
3,567
r
#' Robust EM Algorithm for Gaussian Mixture Models. #' #' Given the prespecified number of clusters, #' the algorithm will calculate the mean and covariance of each cluster. For complete examples #' check out the documentation for robustEM. #' #' @param sampleMat #' All the points in a matrix #' #' @param cluster #' N...
#' Suppresses every n th element of a vector #' #' @param x a vector (numbers, integers, characters, you name it) #' @param nth the multiple of position where the elements will be #' suppressed (nth + 1 actually) or kept (if inverse = T) #' @param empty whether the suppressed element should be replaced by "" #' @...
/R/every_nth.R
no_license
cran/StratigrapheR
R
false
false
1,160
r
#' Suppresses every n th element of a vector #' #' @param x a vector (numbers, integers, characters, you name it) #' @param nth the multiple of position where the elements will be #' suppressed (nth + 1 actually) or kept (if inverse = T) #' @param empty whether the suppressed element should be replaced by "" #' @...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stars.R \name{star.phases} \alias{star.phases} \title{Calculate the seasons and phase type of a star} \usage{ star.phases( star, year, loc, alt.hor = 0, k = 0.2, limit = 6, alt.rs = 10, res = 1/24/6, refraction, atm, tem...
/man/star.phases.Rd
no_license
f-silva-archaeo/skyscapeR
R
false
true
3,153
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stars.R \name{star.phases} \alias{star.phases} \title{Calculate the seasons and phase type of a star} \usage{ star.phases( star, year, loc, alt.hor = 0, k = 0.2, limit = 6, alt.rs = 10, res = 1/24/6, refraction, atm, tem...
# Reading from file input. # This file is manually downloaded from # https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip # and unzipped. fh <- file("household_power_consumption.txt", "r") data <- read.table(text = grep("^[1,2]/2/2007", readLines(fh), value=TRUE), hea...
/plot3.R
no_license
eirara/ExData_Plotting1
R
false
false
1,351
r
# Reading from file input. # This file is manually downloaded from # https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip # and unzipped. fh <- file("household_power_consumption.txt", "r") data <- read.table(text = grep("^[1,2]/2/2007", readLines(fh), value=TRUE), hea...
testlist <- list(iK = 187238924L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
/eDMA/inst/testfiles/PowerSet/AFL_PowerSet/PowerSet_valgrind_files/1609869722-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
89
r
testlist <- list(iK = 187238924L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
houses <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/houses.csv") nba <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/nba.csv") model <- lm(PTS ~ PCT3P + N3PA, data=nba) summary(model) plot(model)
/lecture-scripts/lecture-18.R
no_license
brianlukoff/sta371g
R
false
false
262
r
houses <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/houses.csv") nba <- read.csv("https://raw.githubusercontent.com/brianlukoff/sta371g/master/data/nba.csv") model <- lm(PTS ~ PCT3P + N3PA, data=nba) summary(model) plot(model)
#!/usr/bin/env Rscript library(ggplot2) library(argparser) library(reshape2) library(readr) library(grid) #usage: Rscript ~/github/NanoHub/script/TypeFreqBar.R --input /home/wuzhikun/Project/Population/population/genotype/Sample_SV_genotype_frequency_stat.xls --pdf /home/wuzhikun/Project/Population/population/g...
/script/TypeFreqBar.R
no_license
ZhikunWu/PGC
R
false
false
6,426
r
#!/usr/bin/env Rscript library(ggplot2) library(argparser) library(reshape2) library(readr) library(grid) #usage: Rscript ~/github/NanoHub/script/TypeFreqBar.R --input /home/wuzhikun/Project/Population/population/genotype/Sample_SV_genotype_frequency_stat.xls --pdf /home/wuzhikun/Project/Population/population/g...
## Read in the data, with headings totaldata<-read.table("household_power_consumption.txt", header=TRUE, sep=";", colClasses="character") ## Convert Date column to data format totaldata[,1]=as.Date(totaldata$Date,"%d/%m/%Y") ## Identify rows that correspond to the correct date range plotdata=subset(totaldata,to...
/plot4.R
no_license
darobertson/ExData_Plotting1
R
false
false
1,806
r
## Read in the data, with headings totaldata<-read.table("household_power_consumption.txt", header=TRUE, sep=";", colClasses="character") ## Convert Date column to data format totaldata[,1]=as.Date(totaldata$Date,"%d/%m/%Y") ## Identify rows that correspond to the correct date range plotdata=subset(totaldata,to...
#Lecture 10 #Managing Data getwd() setwd("C:\\Users\\Richie Howell\\Documents\\R Stuffs and things\\CDMA-R") #reload the insurance data (new version of the file) load("exampleData1.rData") #Data Transformations #to allow meaning #Convert Continuous to Discrete #For insurance customer data, create age categorie...
/Lect11.R
no_license
RichieHowell/CDMA-R
R
false
false
1,543
r
#Lecture 10 #Managing Data getwd() setwd("C:\\Users\\Richie Howell\\Documents\\R Stuffs and things\\CDMA-R") #reload the insurance data (new version of the file) load("exampleData1.rData") #Data Transformations #to allow meaning #Convert Continuous to Discrete #For insurance customer data, create age categorie...
library(ggplot2) library(Rmisc) library(lattice) library(plyr) library(cowplot) library(gridExtra) library(grid) library(egg) theme_set(theme_cowplot()) ######################### #FigureS9######## ##################### Data_KP28s <- as.data.frame(read.csv("FigS9_KP28s.csv", header = TRUE)) Data_KP29s <- as.data.frame(...
/FigS9_ExtendedData8/FigS9.R
no_license
livkosterlitz/Figures-Jordt-et-al-2020
R
false
false
4,037
r
library(ggplot2) library(Rmisc) library(lattice) library(plyr) library(cowplot) library(gridExtra) library(grid) library(egg) theme_set(theme_cowplot()) ######################### #FigureS9######## ##################### Data_KP28s <- as.data.frame(read.csv("FigS9_KP28s.csv", header = TRUE)) Data_KP29s <- as.data.frame(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quiz.R \docType{data} \name{random_praise} \alias{random_praise} \alias{random_encouragement} \alias{random_praises} \title{Random praise and encouragement} \format{An object of class \code{character} of length 10.} \usage{ random_praise() r...
/man/random_praise.Rd
permissive
concord-consortium/learnrLara
R
false
true
554
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quiz.R \docType{data} \name{random_praise} \alias{random_praise} \alias{random_encouragement} \alias{random_praises} \title{Random praise and encouragement} \format{An object of class \code{character} of length 10.} \usage{ random_praise() r...
rm(list=ls()) gc() options(scipen=999)
/code/init.R
no_license
billyi01/yibaPython
R
false
false
40
r
rm(list=ls()) gc() options(scipen=999)
#loading all the variables that are necessary: activity_labels <- read.table("./activity_labels.txt") features <- read.table("./features.txt") ##from the test data x_test <- read.table("./test/X_test.txt") y_test <- read.table("./test/y_test.txt") subject_test <- read.table("./test/subject_test.txt") ##From the traini...
/run_analysis.R
no_license
brunorzm/Coursera.Getting.and.Cleaning.Data-Course-Project
R
false
false
2,517
r
#loading all the variables that are necessary: activity_labels <- read.table("./activity_labels.txt") features <- read.table("./features.txt") ##from the test data x_test <- read.table("./test/X_test.txt") y_test <- read.table("./test/y_test.txt") subject_test <- read.table("./test/subject_test.txt") ##From the traini...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proposicoes.R \name{fetch_ids_relacionadas} \alias{fetch_ids_relacionadas} \title{Fetches all propositions'ids related to a proposition} \usage{ fetch_ids_relacionadas(id, casa) } \arguments{ \item{id}{Proposition's ID} \item{casa}{Camara or...
/man/fetch_ids_relacionadas.Rd
no_license
analytics-ufcg/rcongresso
R
false
true
466
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proposicoes.R \name{fetch_ids_relacionadas} \alias{fetch_ids_relacionadas} \title{Fetches all propositions'ids related to a proposition} \usage{ fetch_ids_relacionadas(id, casa) } \arguments{ \item{id}{Proposition's ID} \item{casa}{Camara or...
### (IV) Playing with Models for variable - playerattributes ==== head(splayerattributes$aggression) order(splayerattributes$aggression) str(splayerattributes) summary(splayerattributes) ### (V) Linear modeling model1 = lm(overall_rating ~ potential, data = splayerattributes) summary(model1) SSE = sum...
/Models.R
no_license
flippinuke/UglyMess
R
false
false
880
r
### (IV) Playing with Models for variable - playerattributes ==== head(splayerattributes$aggression) order(splayerattributes$aggression) str(splayerattributes) summary(splayerattributes) ### (V) Linear modeling model1 = lm(overall_rating ~ potential, data = splayerattributes) summary(model1) SSE = sum...
get.kind <- function(lprec, columns = 1:n) { n <- dim(lprec)[2] if(n < 1) columns <- integer(0) ans <- rep("standard", length(columns)) idx <- .Call(RlpSolve_is_semicont, lprec, as.integer(columns)) ans[idx] <- "semi-continuous" idx <- .Call(RlpSolve_is_SOS_var, lprec, as.integer(columns)) ans[idx...
/R/get.kind.R
no_license
FlorianSchwendinger/lpSolveAPI
R
false
false
342
r
get.kind <- function(lprec, columns = 1:n) { n <- dim(lprec)[2] if(n < 1) columns <- integer(0) ans <- rep("standard", length(columns)) idx <- .Call(RlpSolve_is_semicont, lprec, as.integer(columns)) ans[idx] <- "semi-continuous" idx <- .Call(RlpSolve_is_SOS_var, lprec, as.integer(columns)) ans[idx...
rm(list = ls()) library(Daniel) library(dplyr) library(nnet) CalcCImultinom <- function(fit) { s <- summary(fit) coef <- s$coefficients ses <- s$standard.errors ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2] ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2] return(rbind(ci.1,ci.2)) } #key # A, B,C,D,E,F - betaE[2] =...
/Simulations/Scripts/R/Rare/Scenario 24/CMPEn50KrareScen24DB.R
no_license
yadevi/CausalMPE
R
false
false
4,218
r
rm(list = ls()) library(Daniel) library(dplyr) library(nnet) CalcCImultinom <- function(fit) { s <- summary(fit) coef <- s$coefficients ses <- s$standard.errors ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2] ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2] return(rbind(ci.1,ci.2)) } #key # A, B,C,D,E,F - betaE[2] =...
# read the dataset into R library(GEOquery) library(limma) # library(org.Mm.eg.db) library(org.Hs.eg.db) # for collapseBy source("//home/manu/Documents/assignment/dataset_3_neuro/functions.r") dir.create("cache") # to get the dataset uncomment the comment line below and execute res <- getGEO("GSE19404", AnnotGPL =...
/dataset_3_neuro/data3.r
no_license
mrinalmanu/rnaseq_in_R
R
false
false
6,157
r
# read the dataset into R library(GEOquery) library(limma) # library(org.Mm.eg.db) library(org.Hs.eg.db) # for collapseBy source("//home/manu/Documents/assignment/dataset_3_neuro/functions.r") dir.create("cache") # to get the dataset uncomment the comment line below and execute res <- getGEO("GSE19404", AnnotGPL =...
################################################################################ # dataprep 3 - training set for methods schema # # GOAL: For each method tag, find dissertations with only that tag, and # extract a sample subset of rows and relevant columns # so that new research partners can practice taggi...
/experiments/dataprep3 - training.R
no_license
benmiller314/Dissertation-Research
R
false
false
2,926
r
################################################################################ # dataprep 3 - training set for methods schema # # GOAL: For each method tag, find dissertations with only that tag, and # extract a sample subset of rows and relevant columns # so that new research partners can practice taggi...
\name{GQD.aic} \alias{GQD.aic} \title{ Summarize MLE Selection Output for a List of GQD.mle or BiGQD.mle objects. } \description{\code{GQD.aic()} summarizes the MCMC output from a list of \code{GQD.mle()} objects. This may be used to neatly summarize the MCMC output of various models fitted to a given dataset. }...
/man/GQD.aic.Rd
no_license
cran/DiffusionRgqd
R
false
false
3,175
rd
\name{GQD.aic} \alias{GQD.aic} \title{ Summarize MLE Selection Output for a List of GQD.mle or BiGQD.mle objects. } \description{\code{GQD.aic()} summarizes the MCMC output from a list of \code{GQD.mle()} objects. This may be used to neatly summarize the MCMC output of various models fitted to a given dataset. }...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neighbors.R \name{neighbors} \alias{neighbors} \title{neighbors tests whether neighbors of point k,P can be used to re-initialize the EM algorithm and to improve the log-likelihood.} \usage{ neighbors(x, L, k, param, ibp = c(), P, lmin, same...
/man/neighbors.Rd
no_license
MarieEtienne/segTraj
R
false
true
775
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neighbors.R \name{neighbors} \alias{neighbors} \title{neighbors tests whether neighbors of point k,P can be used to re-initialize the EM algorithm and to improve the log-likelihood.} \usage{ neighbors(x, L, k, param, ibp = c(), P, lmin, same...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{imp_out} \alias{imp_out} \title{Outgoing pulse corresponding to the system impulse} \format{ A vector with the length of 100. The zero padding was used to make sure every waveforms has the same length. In this case...
/man/imp_out.Rd
no_license
tankwin08/waveformlidar
R
false
true
519
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{imp_out} \alias{imp_out} \title{Outgoing pulse corresponding to the system impulse} \format{ A vector with the length of 100. The zero padding was used to make sure every waveforms has the same length. In this case...
setMethod("show", signature("DETS"), function(object) { cat("## Dynamic Ensemble for Time Series Forecasting ##\n\n") cat("Base ensemble specs:\n") print(object@base_ensemble) cat("\n") cat("Lambda is set to:", object@lambda, "\n") ...
/R/dets-methods.r
no_license
vcerqueira/tsensembler
R
false
false
1,060
r
setMethod("show", signature("DETS"), function(object) { cat("## Dynamic Ensemble for Time Series Forecasting ##\n\n") cat("Base ensemble specs:\n") print(object@base_ensemble) cat("\n") cat("Lambda is set to:", object@lambda, "\n") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hello.R \name{add} \alias{add} \title{Add} \usage{ add(a, b) } \arguments{ \item{a}{the first number} \item{b}{the second number} } \value{ The sum of two numbers } \description{ Adds two numbers } \examples{ add(2, 3) }
/man/add.Rd
permissive
ALotOfData/DATA-598-WI20-week-7
R
false
true
300
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hello.R \name{add} \alias{add} \title{Add} \usage{ add(a, b) } \arguments{ \item{a}{the first number} \item{b}{the second number} } \value{ The sum of two numbers } \description{ Adds two numbers } \examples{ add(2, 3) }
setwd("C:/Users/Laura Cabnillas/Documents/specdata") directorio="C:/Users/Laura Cabanillas/Documents/specdata" corr <- function(directorio ,horizonte = 0){ correlacion <- c() p <- 0 for(i in 1:332){ if(nchar(i)==1){ valor <- read.csv(paste("00",i,".csv...
/corr.R
no_license
Laugcba/Software_Actuarial_III
R
false
false
907
r
setwd("C:/Users/Laura Cabnillas/Documents/specdata") directorio="C:/Users/Laura Cabanillas/Documents/specdata" corr <- function(directorio ,horizonte = 0){ correlacion <- c() p <- 0 for(i in 1:332){ if(nchar(i)==1){ valor <- read.csv(paste("00",i,".csv...
#' Database versions of the nycflights13 data #' #' These functions cache the data from the \code{nycflights13} database in #' a local database, for use in examples and vignettes. Indexes are created #' to making joining tables on natural keys efficient. #' #' @keywords internal #' @name h2-nycflights13 NULL #' @expor...
/R/data-nycflights13.r
permissive
hoesler/dplyr-src-h2
R
false
false
1,486
r
#' Database versions of the nycflights13 data #' #' These functions cache the data from the \code{nycflights13} database in #' a local database, for use in examples and vignettes. Indexes are created #' to making joining tables on natural keys efficient. #' #' @keywords internal #' @name h2-nycflights13 NULL #' @expor...
model1<-lm(MPG ~. ,data=train) step<-stepAIC(model1,direction = "both") summary(model1) step vif(model1) model2<-lm(MPG ~ Horsepower + Weight + Acceleration + Cylinders3 + Cylinders6 + Car_Nameamc + Car_Nameford + Car_Namechevrolet + Car_Namefiat + Car_Namevolkswagon + Car_Namecapri +...
/Project.R
no_license
vaish6-dinesh/R-exercise-
R
false
false
3,426
r
model1<-lm(MPG ~. ,data=train) step<-stepAIC(model1,direction = "both") summary(model1) step vif(model1) model2<-lm(MPG ~ Horsepower + Weight + Acceleration + Cylinders3 + Cylinders6 + Car_Nameamc + Car_Nameford + Car_Namechevrolet + Car_Namefiat + Car_Namevolkswagon + Car_Namecapri +...
#' #' @export #' plot_equity_candles <- function(prices) { prices %>% tk_xts(silent=TRUE) %>% chartSeries(TA="addVo();addBBands();addRSI()") } #' #' @export #' plot_commodity_candles <- function(prices) { prices %>% tk_xts(silent=TRUE) %>% chartSeries(TA="addVo();addBBands();addCCI()") } ...
/R/symbol_plots.R
no_license
rjsteckel/boilkettle
R
false
false
719
r
#' #' @export #' plot_equity_candles <- function(prices) { prices %>% tk_xts(silent=TRUE) %>% chartSeries(TA="addVo();addBBands();addRSI()") } #' #' @export #' plot_commodity_candles <- function(prices) { prices %>% tk_xts(silent=TRUE) %>% chartSeries(TA="addVo();addBBands();addCCI()") } ...
library(glmnet) mydata = read.table("./TrainingSet/RF/central_nervous_system.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.15,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/central_nervous_sy...
/Model/EN/Classifier/central_nervous_system/central_nervous_system_030.R
no_license
leon1003/QSMART
R
false
false
399
r
library(glmnet) mydata = read.table("./TrainingSet/RF/central_nervous_system.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.15,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/central_nervous_sy...
#-------------------------------------------------------------------------------- #' getDEAList #' #' @param p list at least containing elements 'dea' and 'ann' #' #' @return p list with loaded DEAs & annotation and miRNA library in $families #' loadAll <- function(p){ # DEA if(is.character(p$dea)){ libr...
/functions/runEnrichMiR.R
no_license
ETHZ-INS/enrichMiR_benchmark
R
false
false
11,458
r
#-------------------------------------------------------------------------------- #' getDEAList #' #' @param p list at least containing elements 'dea' and 'ann' #' #' @return p list with loaded DEAs & annotation and miRNA library in $families #' loadAll <- function(p){ # DEA if(is.character(p$dea)){ libr...
my_amort <- function( P, #total principal r_a, #annual interest rate n, #total number of months t0, #start date P0 = 0, #initial principal paid (for refinance calcs) I0 = 0 #initial interest paid (for refinance calcs) ) { #monthly interest rate r <- r_a/100/12 #monthly payment M <- P * r / (1 - (...
/fun-my_amort.R
no_license
mcnewcp/shiny-mortgage-refinance
R
false
false
980
r
my_amort <- function( P, #total principal r_a, #annual interest rate n, #total number of months t0, #start date P0 = 0, #initial principal paid (for refinance calcs) I0 = 0 #initial interest paid (for refinance calcs) ) { #monthly interest rate r <- r_a/100/12 #monthly payment M <- P * r / (1 - (...
library(maptools) library(raster) library(ggplot2) library(rgdal) library(ggmap) library(scatterpie) library(tidyr) library(magrittr) library(dplyr) setwd("C:/Users/Deren/Desktop/graduation_project") df <- read.csv("data/spotify_languages.csv") %>% dplyr::select(-X,-Region_Language) artist_genres <- read.csv("data...
/analysis3/pie chart mapping.R
no_license
pektasg/GraduationProject
R
false
false
2,557
r
library(maptools) library(raster) library(ggplot2) library(rgdal) library(ggmap) library(scatterpie) library(tidyr) library(magrittr) library(dplyr) setwd("C:/Users/Deren/Desktop/graduation_project") df <- read.csv("data/spotify_languages.csv") %>% dplyr::select(-X,-Region_Language) artist_genres <- read.csv("data...
context("measures") test_that("measures", { ct = binaryclass.task options(warn = 2) mymeasure = makeMeasure(id = "foo", minimize = TRUE, properties = c("classif", "classif.multi", "regr", "predtype.response", "predtype.prob"), fun = function(task, model, pred, feats, extra.args) { tt = pred 1...
/tests/testthat/test_base_measures.R
no_license
giuseppec/mlr
R
false
false
32,557
r
context("measures") test_that("measures", { ct = binaryclass.task options(warn = 2) mymeasure = makeMeasure(id = "foo", minimize = TRUE, properties = c("classif", "classif.multi", "regr", "predtype.response", "predtype.prob"), fun = function(task, model, pred, feats, extra.args) { tt = pred 1...
\name{ppswr} \alias{ppswr} \title{PPS sampling with replacement} \description{Use PPS sampling to select a sample of n units out of N with replacement} \usage{ppswr(sizes,n)} \arguments{ \item{sizes}{A vector of the sizes of the units in the population} \item{n}{The sample size} } \value{Returns the indices of the un...
/man/ppswr.Rd
no_license
cran/pps
R
false
false
529
rd
\name{ppswr} \alias{ppswr} \title{PPS sampling with replacement} \description{Use PPS sampling to select a sample of n units out of N with replacement} \usage{ppswr(sizes,n)} \arguments{ \item{sizes}{A vector of the sizes of the units in the population} \item{n}{The sample size} } \value{Returns the indices of the un...
\name{difLord} \alias{difLord} \alias{plot.Lord} \alias{print.Lord} \title{Lord's chi-squared DIF method} \description{ Performs DIF detection using Lord's chi-squared method. } \usage{ difLord(Data, group, focal.name, model, c = NULL, engine = "ltm", discr = 1, irtParam = NULL, same.scale = TRUE, ...
/man/difLord.rd
no_license
cran/difR
R
false
false
21,743
rd
\name{difLord} \alias{difLord} \alias{plot.Lord} \alias{print.Lord} \title{Lord's chi-squared DIF method} \description{ Performs DIF detection using Lord's chi-squared method. } \usage{ difLord(Data, group, focal.name, model, c = NULL, engine = "ltm", discr = 1, irtParam = NULL, same.scale = TRUE, ...
############################################################################### # This script fits the estimated curve and first derivative of the model using # the PL estimation procedure ############################################################################### rm(list = ls()) set.seed(4428967) # Source...
/codePL/application_PL_inference.R
no_license
christithomp/semiparametric-risk-score
R
false
false
10,980
r
############################################################################### # This script fits the estimated curve and first derivative of the model using # the PL estimation procedure ############################################################################### rm(list = ls()) set.seed(4428967) # Source...
data(harborSeal) head(harborSeal) ## Calculate Log multipliers for Argos error argosClasses <- c("3", "2", "1", "0", "A", "B") ArgosMultFactors <- data.frame(Argos_loc_class=argosClasses, errX=log(c(1, 1.5, 4, 14, 5.21, 20.78)), errY=log(c(1, 1.5, 4, 14, ...
/demo/harborSeal.R
no_license
mudit2013/crawl
R
false
false
1,673
r
data(harborSeal) head(harborSeal) ## Calculate Log multipliers for Argos error argosClasses <- c("3", "2", "1", "0", "A", "B") ArgosMultFactors <- data.frame(Argos_loc_class=argosClasses, errX=log(c(1, 1.5, 4, 14, 5.21, 20.78)), errY=log(c(1, 1.5, 4, 14, ...
context("Check read.image") MAX_INT = min(.Machine$integer.max, 2147483647) pixelTypes = within(pixelTypes, { n = 256^bytesPerPixel x = pmin(n, ifelse(isSigned & !isFloatingPoint, (MAX_INT+1)/2, MAX_INT)) scaleFactor = ifelse(bytesPerPixel>2, round(n/MAX_INT), 1) refMin = ifelse(isSigned & !isFloatingPoint, -...
/tests/testthat/test-read.image.R
no_license
aoles/RBioFormats
R
false
false
1,749
r
context("Check read.image") MAX_INT = min(.Machine$integer.max, 2147483647) pixelTypes = within(pixelTypes, { n = 256^bytesPerPixel x = pmin(n, ifelse(isSigned & !isFloatingPoint, (MAX_INT+1)/2, MAX_INT)) scaleFactor = ifelse(bytesPerPixel>2, round(n/MAX_INT), 1) refMin = ifelse(isSigned & !isFloatingPoint, -...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/jsonview.r \name{renderJsontreeview} \alias{renderJsontreeview} \title{Widget render function for use in Shiny} \usage{ renderJsontreeview(expr, env = parent.frame(), quoted = FALSE) } \arguments{ \item{expr}{expr} \item{env}{env} \item{quo...
/man/renderJsontreeview.Rd
no_license
tpopenfoose/hrbrmisc
R
false
true
392
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/jsonview.r \name{renderJsontreeview} \alias{renderJsontreeview} \title{Widget render function for use in Shiny} \usage{ renderJsontreeview(expr, env = parent.frame(), quoted = FALSE) } \arguments{ \item{expr}{expr} \item{env}{env} \item{quo...
# Description # Cities eviction data in South Carolina # Author: Amy Kouch # Version: 2020-01-29 # Libraries library(tidyverse) # Parameters # Libraries library(tidyverse) library(vroom) library(utils) # Parameters # URL for raw aggregate data url_aggregate <- "https://eviction-lab-data-downloads.s3.amazonaws.co...
/scripts/evictions.R
no_license
amykouch/sc-evictions
R
false
false
1,052
r
# Description # Cities eviction data in South Carolina # Author: Amy Kouch # Version: 2020-01-29 # Libraries library(tidyverse) # Parameters # Libraries library(tidyverse) library(vroom) library(utils) # Parameters # URL for raw aggregate data url_aggregate <- "https://eviction-lab-data-downloads.s3.amazonaws.co...
#a histogram of global active power for the days 2007-02-01 and # 2007-02-02 plot1 <- function() { #set up data if (!file.exists("dat.zip")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip","./dat.zip") } unzip("dat.zip") dat <- read.delim("household_power_c...
/plot1.r
no_license
moorsalin/ExData_Plotting1
R
false
false
1,265
r
#a histogram of global active power for the days 2007-02-01 and # 2007-02-02 plot1 <- function() { #set up data if (!file.exists("dat.zip")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip","./dat.zip") } unzip("dat.zip") dat <- read.delim("household_power_c...
#CheckAOS_Codes #Function to check species names against names in data, update any names as needed, and generate table of changes that were made CheckAOS_Codes<-function(DataIn){ require(RCurl) require(curl) require(utils) require(foreign) require(reshape2) require(plyr) require(dplyr) require(stri...
/CheckAOS_Codes_forNCRNbirds.R
no_license
zachladin/Occupancy_and_Abundance_Model_functions
R
false
false
6,999
r
#CheckAOS_Codes #Function to check species names against names in data, update any names as needed, and generate table of changes that were made CheckAOS_Codes<-function(DataIn){ require(RCurl) require(curl) require(utils) require(foreign) require(reshape2) require(plyr) require(dplyr) require(stri...
library(fst); library(data.table); library(stringr) library(lubridate); library(magrittr); library(parallel) setwd("/home/whe") #------------약물 검색 함수용----------- druginfo <- fread("건강보험심사평가원_의약품 주성분 정보 2019.12.csv") #------------ 자동 질병코드 -------- nm <- function(x, y=0, z=9){ x<-paste0(x,y:z) return(x) } nmm <- ...
/code1221.R
permissive
HaeunWee/KDH
R
false
false
36,532
r
library(fst); library(data.table); library(stringr) library(lubridate); library(magrittr); library(parallel) setwd("/home/whe") #------------약물 검색 함수용----------- druginfo <- fread("건강보험심사평가원_의약품 주성분 정보 2019.12.csv") #------------ 자동 질병코드 -------- nm <- function(x, y=0, z=9){ x<-paste0(x,y:z) return(x) } nmm <- ...
# Graphs menu dialogs # last modified 2023-01-01 by J. Fox # applied patch to improve window behaviour supplied by Milan Bouchet-Valat 2011-09-22 # the following functions improved by Miroslav Ristic 2013-07: barGraph, indexPlot, boxPlot, # DensityPlot, Histogram, pieChart, PlotMeans, QQPlot, scatterPlot, scatt...
/R/graphs-menu.R
no_license
cran/Rcmdr
R
false
false
164,462
r
# Graphs menu dialogs # last modified 2023-01-01 by J. Fox # applied patch to improve window behaviour supplied by Milan Bouchet-Valat 2011-09-22 # the following functions improved by Miroslav Ristic 2013-07: barGraph, indexPlot, boxPlot, # DensityPlot, Histogram, pieChart, PlotMeans, QQPlot, scatterPlot, scatt...
\name{plot.pp3} \Rdversion{1.1} \alias{plot.pp3} \title{ Plot a Three-Dimensional Point Pattern } \description{ Plots a three-dimensional point pattern. } \usage{ \method{plot}{pp3}(x, ..., eye=NULL, org=NULL, theta=25, phi=15, type=c("p", "n", "h"), box.back=list(col="pink"...
/man/plot.pp3.Rd
no_license
kasselhingee/spatstat
R
false
false
2,676
rd
\name{plot.pp3} \Rdversion{1.1} \alias{plot.pp3} \title{ Plot a Three-Dimensional Point Pattern } \description{ Plots a three-dimensional point pattern. } \usage{ \method{plot}{pp3}(x, ..., eye=NULL, org=NULL, theta=25, phi=15, type=c("p", "n", "h"), box.back=list(col="pink"...
# R script for the visualisation of time series in bars from a "start timestamp" to an "end timestamp" # an example of this visualisation can be found in the folder above gg_timebar_df <- function(dataframe, id.vars, timestamp.start, timestamp.end){ # arguments: dataframe = subset of the data you want to visu...
/datavisualisatie/timeseries_barplots.R
no_license
basbaccarne/mict
R
false
false
1,822
r
# R script for the visualisation of time series in bars from a "start timestamp" to an "end timestamp" # an example of this visualisation can be found in the folder above gg_timebar_df <- function(dataframe, id.vars, timestamp.start, timestamp.end){ # arguments: dataframe = subset of the data you want to visu...
library(reshape2) library(ggplot2) library(RColorBrewer) library(RJSONIO) # ----------------------------------------------------------------------------- # R code used to preprare the data provided to us as part of the UNDP/QMSS Data # Dive (see CodeBook) for web visualization using D3. # The goal here is to get the ...
/ei.R
no_license
lc2847/undp
R
false
false
13,998
r
library(reshape2) library(ggplot2) library(RColorBrewer) library(RJSONIO) # ----------------------------------------------------------------------------- # R code used to preprare the data provided to us as part of the UNDP/QMSS Data # Dive (see CodeBook) for web visualization using D3. # The goal here is to get the ...
world_ec <- wdi_data %>% filter(`Indicator Code`== 'NE.EXP.GNFS.CD') %>% select(country = `Country Name`, index = `Indicator Name`, matches('^199[6-9]|^20[0-1][0-9]')) %>% rbind(wdi_data %>% filter(`Indicator Code`== 'NY.GDP.PCAP.CD') %>% select(country = `Country Name`, index = `Indicator Name`, match...
/hw_10/codes/A5.R
no_license
Minam7/Data_Analysis_HW
R
false
false
4,155
r
world_ec <- wdi_data %>% filter(`Indicator Code`== 'NE.EXP.GNFS.CD') %>% select(country = `Country Name`, index = `Indicator Name`, matches('^199[6-9]|^20[0-1][0-9]')) %>% rbind(wdi_data %>% filter(`Indicator Code`== 'NY.GDP.PCAP.CD') %>% select(country = `Country Name`, index = `Indicator Name`, match...
# https://johnbaumgartner.wordpress.com/2012/07/26/getting-rasters-into-shape-from-r/ gdal_polygonizeR <- function(x, outshape=NULL, gdalformat = 'ESRI Shapefile', pypath=NULL, readpoly=TRUE, quiet=TRUE) { if (isTRUE(readpoly)) require(rgdal) if (is.null(pypath)) { pypath <- ...
/gdal_polygonizeR.R
no_license
codyschank/tapir_sdms
R
false
false
1,485
r
# https://johnbaumgartner.wordpress.com/2012/07/26/getting-rasters-into-shape-from-r/ gdal_polygonizeR <- function(x, outshape=NULL, gdalformat = 'ESRI Shapefile', pypath=NULL, readpoly=TRUE, quiet=TRUE) { if (isTRUE(readpoly)) require(rgdal) if (is.null(pypath)) { pypath <- ...
library("saos") # trends in number of judgments for every common court data(courts) dat <- vector("list", 291) for (i in 1:291) { dat[[i]] <- search_judgments(ccCourtId = courts$id[i], judgmentDateTo = Sys.Date(), limit = NULL, force = TRUE) } # proble...
/common_courts_fetching.R
no_license
saos-apps/saos-apps
R
false
false
419
r
library("saos") # trends in number of judgments for every common court data(courts) dat <- vector("list", 291) for (i in 1:291) { dat[[i]] <- search_judgments(ccCourtId = courts$id[i], judgmentDateTo = Sys.Date(), limit = NULL, force = TRUE) } # proble...
#Reads in and formats data thing <- read.table("household_power_consumption.txt", header = FALSE, col.names = c("date", "time", "activepower","reactivepower","voltage","intensity","submeter1","submeter2","submeter3"), sep = ";", nrows = 2880, skip = 66637) thing$date <- strptime(thing$date, "%d/%m/%Y") thing$time <- st...
/plot3.R
no_license
leahjohannesen/dst-exdata-plotting1
R
false
false
992
r
#Reads in and formats data thing <- read.table("household_power_consumption.txt", header = FALSE, col.names = c("date", "time", "activepower","reactivepower","voltage","intensity","submeter1","submeter2","submeter3"), sep = ";", nrows = 2880, skip = 66637) thing$date <- strptime(thing$date, "%d/%m/%Y") thing$time <- st...
## Script for stockassessment.org .libPaths(".") devtools:::install_github("kaskr/gridConstruct/gridConstruct") devtools:::install_github("DTUAqua/limfjord/mussel") ## Load packages and data library(DATRAS) library(mussel) d <- readExchange("data.zip") ## Remove invalid hauls (I/V) d <- subset(d, HaulVal == "V") ## ...
/script.R
no_license
DTUAqua/limfjord
R
false
false
1,478
r
## Script for stockassessment.org .libPaths(".") devtools:::install_github("kaskr/gridConstruct/gridConstruct") devtools:::install_github("DTUAqua/limfjord/mussel") ## Load packages and data library(DATRAS) library(mussel) d <- readExchange("data.zip") ## Remove invalid hauls (I/V) d <- subset(d, HaulVal == "V") ## ...