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
# ladowanie danych load("../../data/display_data.RData") # przetwarzanie danych library(dplyr) input_df = display_data %>% group_by(creative_id) %>% summarise(n = n()) # konstruowanie modelu data_for_modelling = display_data %>% group_by(day, creative_id) %>% summarise(conversions = sum(conversion), ...
/shiny_apps/adExplorer/deep_backend.R
no_license
zkyrtap/politechnika
R
false
false
761
r
# ladowanie danych load("../../data/display_data.RData") # przetwarzanie danych library(dplyr) input_df = display_data %>% group_by(creative_id) %>% summarise(n = n()) # konstruowanie modelu data_for_modelling = display_data %>% group_by(day, creative_id) %>% summarise(conversions = sum(conversion), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/output_processing.R \name{plot_data} \alias{plot_data} \title{Plot data} \usage{ plot_data(data, textsize = 9, pointsize = 1, linesize = 0.5, facet_col = NULL, detection_threshold = 20) } \arguments{ \item{data}{data frame of raw, filtered,...
/man/plot_data.Rd
permissive
SineadMorris/ushr
R
false
true
1,261
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/output_processing.R \name{plot_data} \alias{plot_data} \title{Plot data} \usage{ plot_data(data, textsize = 9, pointsize = 1, linesize = 0.5, facet_col = NULL, detection_threshold = 20) } \arguments{ \item{data}{data frame of raw, filtered,...
# Regression Template # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # Splitting the dataset into the Training set and Test set # # install.packages('caTools') # library(caTools) # set.seed(123) # split = sample.split(dataset$Salary, SplitRatio = 2/3) # training_set = subse...
/2 - Regression/4 - Support Vector Regression/support_vector_regression.R
no_license
ImThangadurai/Machine-Learning
R
false
false
1,600
r
# Regression Template # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # Splitting the dataset into the Training set and Test set # # install.packages('caTools') # library(caTools) # set.seed(123) # split = sample.split(dataset$Salary, SplitRatio = 2/3) # training_set = subse...
library(plotly) library(lubridate) #if(!("bRema" %in% rownames(installed.packages()))) #{ # library(devtools) # install_github('tinnaing347/bRema') #} library(devtools) #install_github('cunybpl/bRema') library(bRema) result_table <- function(result, model) { final_test_result = result[[model]]$stat_test$main_t...
/bRema/global.R
no_license
cunybpl/shinyapps
R
false
false
2,800
r
library(plotly) library(lubridate) #if(!("bRema" %in% rownames(installed.packages()))) #{ # library(devtools) # install_github('tinnaing347/bRema') #} library(devtools) #install_github('cunybpl/bRema') library(bRema) result_table <- function(result, model) { final_test_result = result[[model]]$stat_test$main_t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DAISIE_plot_island.R \name{DAISIE_plot_island} \alias{DAISIE_plot_island} \title{Plot colonisation and branching time of species found on an island dataset.} \usage{ DAISIE_plot_island(island, island_age = NA) } \arguments{ \item{island}{Isla...
/man/DAISIE_plot_island.Rd
no_license
xieshu95/Test-Trasie
R
false
true
1,516
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DAISIE_plot_island.R \name{DAISIE_plot_island} \alias{DAISIE_plot_island} \title{Plot colonisation and branching time of species found on an island dataset.} \usage{ DAISIE_plot_island(island, island_age = NA) } \arguments{ \item{island}{Isla...
cv.ES <- function(x, object,K=10,M){ if (missing(M)) { M <- NULL for (count in 1:(length(object$c1)-1)) { M <- c(M,seq(object$c1[count],object$c1[count+1],length.out=10)) } M[length(M)] <- 0 } counts <- length(M) n <- NROW(x) k <- NCOL(x) CVgrps <- split(sample(1:n), rep(1:K, length=n)...
/ES/R/cv.ES.R
no_license
ingted/R-Examples
R
false
false
1,552
r
cv.ES <- function(x, object,K=10,M){ if (missing(M)) { M <- NULL for (count in 1:(length(object$c1)-1)) { M <- c(M,seq(object$c1[count],object$c1[count+1],length.out=10)) } M[length(M)] <- 0 } counts <- length(M) n <- NROW(x) k <- NCOL(x) CVgrps <- split(sample(1:n), rep(1:K, length=n)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make.design.data.R \name{make.design.data} \alias{make.design.data} \title{Create design dataframes for crm} \usage{ make.design.data(data, parameters = list()) } \arguments{ \item{data}{Processed data list; resulting value from proc...
/marked/man/make.design.data.Rd
no_license
pconn/marked
R
false
true
4,110
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make.design.data.R \name{make.design.data} \alias{make.design.data} \title{Create design dataframes for crm} \usage{ make.design.data(data, parameters = list()) } \arguments{ \item{data}{Processed data list; resulting value from proc...
execute <- function(connectionDetails, databaseName, cdmDatabaseSchema, cohortDatabaseSchema, cohortTable, outputFolder, createCohorts = T, runValidation = T, packageResults = T, ...
/SkeletonValidationStudy/R/main.R
permissive
parkdongsu/StudyProtocolSandbox
R
false
false
2,075
r
execute <- function(connectionDetails, databaseName, cdmDatabaseSchema, cohortDatabaseSchema, cohortTable, outputFolder, createCohorts = T, runValidation = T, packageResults = T, ...
rm(list=ls()) library(lubridate) library(ggpubr) library(purrr) library(tidyverse) library(data.table) library(dplyr) library(ggplot2) options(digit=9) options(digits=9) source_path_1 = "/Users/hn/Documents/GitHub/Ag/Lagoon/core_lagoon.R" source_path_2 = "/Users/hn/Documents/GitHub/Ag/Lagoon/core_plot_lagoon.R" source...
/Lagoon/999_laptop/52_analysis_plots/geo_maps/run_diff_map/3_wtr_yr_diff_on_map_RUN_New.R
permissive
HNoorazar/Ag
R
false
false
6,303
r
rm(list=ls()) library(lubridate) library(ggpubr) library(purrr) library(tidyverse) library(data.table) library(dplyr) library(ggplot2) options(digit=9) options(digits=9) source_path_1 = "/Users/hn/Documents/GitHub/Ag/Lagoon/core_lagoon.R" source_path_2 = "/Users/hn/Documents/GitHub/Ag/Lagoon/core_plot_lagoon.R" source...
load_all() library(plyr) library(dplyr) library(purrr) library(magrittr) load_all() # Load and aggregate BS database get_current_sos() data(sos_raw) country_codes <- read.csv("inst/rawdata/FAOCountryCodes.csv", as.is = TRUE) names(country_codes) <- tolower(names(country_codes)) sosid <- paste0("SOS", 1:nrow(sos_r...
/inst/scripts/bs2/country_analysis/1_transform_datasets.R
permissive
ecohealthalliance/sos
R
false
false
6,143
r
load_all() library(plyr) library(dplyr) library(purrr) library(magrittr) load_all() # Load and aggregate BS database get_current_sos() data(sos_raw) country_codes <- read.csv("inst/rawdata/FAOCountryCodes.csv", as.is = TRUE) names(country_codes) <- tolower(names(country_codes)) sosid <- paste0("SOS", 1:nrow(sos_r...
## This script looks at the connectivity of microproteins # Load the necessary packages library(ggplot2); library(data.table); library(cowplot) #### Prepare the STRING data #### # Load the data STRING <- fread("9606.protein.links.detailed.v10.5.txt") # Load String databse STRING[, protein1 := gsub("9606.", ...
/R scripts/MP_connectivity.R
no_license
Rappsilber-Laboratory/ProteomeHD
R
false
false
19,653
r
## This script looks at the connectivity of microproteins # Load the necessary packages library(ggplot2); library(data.table); library(cowplot) #### Prepare the STRING data #### # Load the data STRING <- fread("9606.protein.links.detailed.v10.5.txt") # Load String databse STRING[, protein1 := gsub("9606.", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/access_databases.R \name{associated_genes_with_kegg} \alias{associated_genes_with_kegg} \title{Associate genes with KEGG} \usage{ associated_genes_with_kegg(organism_code, classification = "module", genes = NULL) } \arguments{ \item{organis...
/man/associated_genes_with_kegg.Rd
permissive
shackett/fluxr
R
false
true
718
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/access_databases.R \name{associated_genes_with_kegg} \alias{associated_genes_with_kegg} \title{Associate genes with KEGG} \usage{ associated_genes_with_kegg(organism_code, classification = "module", genes = NULL) } \arguments{ \item{organis...
# Side Codes -------------------------------------------------------------- rm(list=ls()) # This is a side thing: Removes all the objects from the environment window # Better way to explicitly create equal-length vectors before we operate on them # The rep function is very useful for this task, letting us create a ve...
/Side Codes.R
no_license
mustafghan/R-Projects
R
false
false
910
r
# Side Codes -------------------------------------------------------------- rm(list=ls()) # This is a side thing: Removes all the objects from the environment window # Better way to explicitly create equal-length vectors before we operate on them # The rep function is very useful for this task, letting us create a ve...
lvmPrintPlot <- function (model, lbls, capName, experimentNo, colour = 0, savedir = getwd()) { # % LVMPRINTPLOT Print latent space for learnt model. # % FORMAT # % DESC prints a latent space repsresentation for an LVM model. # % ARG model : the model to use for plotting the latent space. # % ARG lbls : any l...
/R/vargplvm/R/lvmPrintPlot.R
no_license
shaohua0720/vargplvm
R
false
false
3,038
r
lvmPrintPlot <- function (model, lbls, capName, experimentNo, colour = 0, savedir = getwd()) { # % LVMPRINTPLOT Print latent space for learnt model. # % FORMAT # % DESC prints a latent space repsresentation for an LVM model. # % ARG model : the model to use for plotting the latent space. # % ARG lbls : any l...
# [Konsep Grammar of Graphic](https://academy.dqlab.id/main/livecode/259/469/2337) library(ggplot2) # [Mengingat Kembali](https://academy.dqlab.id/main/livecode/259/469/2338) library(ggplot2) qplot(x = carat, y = price, colour = clarity, data = diamonds) # [Pembuatan Grafik dengan ggplot](https://academy.dqlab....
/Learn/R/Fundamental/Advanced Data Visualization for Everyone/Advanced Data Visualization for Everyone.R
permissive
Rahmat-Afriyadi/DQLab
R
false
false
17,090
r
# [Konsep Grammar of Graphic](https://academy.dqlab.id/main/livecode/259/469/2337) library(ggplot2) # [Mengingat Kembali](https://academy.dqlab.id/main/livecode/259/469/2338) library(ggplot2) qplot(x = carat, y = price, colour = clarity, data = diamonds) # [Pembuatan Grafik dengan ggplot](https://academy.dqlab....
\alias{gtkTreeViewSetTooltipColumn} \name{gtkTreeViewSetTooltipColumn} \title{gtkTreeViewSetTooltipColumn} \description{If you only plan to have simple (text-only) tooltips on full rows, you can use this function to have \code{\link{GtkTreeView}} handle these automatically for you. \code{column} should be set to the co...
/RGtk2/man/gtkTreeViewSetTooltipColumn.Rd
no_license
lawremi/RGtk2
R
false
false
987
rd
\alias{gtkTreeViewSetTooltipColumn} \name{gtkTreeViewSetTooltipColumn} \title{gtkTreeViewSetTooltipColumn} \description{If you only plan to have simple (text-only) tooltips on full rows, you can use this function to have \code{\link{GtkTreeView}} handle these automatically for you. \code{column} should be set to the co...
# ========================================================================== # Biobase package initialization # ========================================================================== .onLoad <- function(libname, pkgname) { require(methods) require(Rsamtools)||stop("Package Rsamtools not available. Please inst...
/PipelineSoftware/BICseq/R Package/BICseq/R/zzz.R
permissive
daviddliu/THetA_luigi
R
false
false
488
r
# ========================================================================== # Biobase package initialization # ========================================================================== .onLoad <- function(libname, pkgname) { require(methods) require(Rsamtools)||stop("Package Rsamtools not available. Please inst...
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127308179L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
/dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615938931-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
826
r
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127308179L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
#' Clustering matching #' #' This function identifies true label groups between reference groups and #' clusters. #' #' @param idc A character vector of reference group labels. # TODOELI: more informative param names? #' @param idc1 Vector of labels for clusters. #' #' @return Vector of corresponding reference labels f...
/R/compute_labels.R
permissive
crsky1023/matchSCore2
R
false
false
812
r
#' Clustering matching #' #' This function identifies true label groups between reference groups and #' clusters. #' #' @param idc A character vector of reference group labels. # TODOELI: more informative param names? #' @param idc1 Vector of labels for clusters. #' #' @return Vector of corresponding reference labels f...
summary(transaction) summary(location) summary(log) summary(transaction)
/RCode/Exploritory Analysis.R
no_license
theroyalbob/KSB621-Spring21-AU
R
false
false
74
r
summary(transaction) summary(location) summary(log) summary(transaction)
context("C++") test_that("Catch unit tests pass", { expect_cpp_tests_pass("testrcpp") })
/inst/testrcpp/tests/testthat/test-cpp.R
permissive
mrc-ide/mockcpp
R
false
false
93
r
context("C++") test_that("Catch unit tests pass", { expect_cpp_tests_pass("testrcpp") })
library(GEVStableGarch) ### Name: gsSelect ### Title: Selects the best model according to goodness-of-fit criteria ### Aliases: gsSelect ### ** Examples # Best ARMA-GARCH model within the range ARMA(0,0)-GARCH(1,0) to ARMA(0,0)-GARCH(1,1) # using the Corrected Akaike Information Criteria (AICc) data(dem2gbp) x = d...
/data/genthat_extracted_code/GEVStableGarch/examples/gsSelect.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
516
r
library(GEVStableGarch) ### Name: gsSelect ### Title: Selects the best model according to goodness-of-fit criteria ### Aliases: gsSelect ### ** Examples # Best ARMA-GARCH model within the range ARMA(0,0)-GARCH(1,0) to ARMA(0,0)-GARCH(1,1) # using the Corrected Akaike Information Criteria (AICc) data(dem2gbp) x = d...
# read data and convert to data frame readMatrix<-function(heatmapData){ if (is.matrix(heatmapData)) { x = data.frame(heatmapData) } else if (is.data.frame(heatmapData)) { x = heatmapData } else { x<-read.csv(heatmapData,row.names=1) } x } getLayout<-function(infoFile,infoCols,heatmapData,barData,doBlocks,treeWidth=1...
/plotTree/plotTreeShiny/plotTree.R
no_license
GuangchuangYu/plotting_tree_with_data
R
false
false
10,064
r
# read data and convert to data frame readMatrix<-function(heatmapData){ if (is.matrix(heatmapData)) { x = data.frame(heatmapData) } else if (is.data.frame(heatmapData)) { x = heatmapData } else { x<-read.csv(heatmapData,row.names=1) } x } getLayout<-function(infoFile,infoCols,heatmapData,barData,doBlocks,treeWidth=1...
library(FLLat) ### Name: plot.FLLat ### Title: Plots Results from the Fused Lasso Latent Feature Model ### Aliases: plot.FLLat ### ** Examples ## Load simulated aCGH data. data(simaCGH) ## Run FLLat for J = 5, lam1 = 1 and lam2 = 9. result <- FLLat(simaCGH,J=5,lam1=1,lam2=9) ## Plot the estimated features. plot(r...
/data/genthat_extracted_code/FLLat/examples/plot.FLLat.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
403
r
library(FLLat) ### Name: plot.FLLat ### Title: Plots Results from the Fused Lasso Latent Feature Model ### Aliases: plot.FLLat ### ** Examples ## Load simulated aCGH data. data(simaCGH) ## Run FLLat for J = 5, lam1 = 1 and lam2 = 9. result <- FLLat(simaCGH,J=5,lam1=1,lam2=9) ## Plot the estimated features. plot(r...
source("ols_adj.R") library("tidyverse") library("moments") thresh_entries <- function(X, tau = 0.025){ if (tau == 0){ return(X) } apply(X, 2, function(x){ thresh <- quantile(x, c(tau, 1 - tau)) x[x < thresh[1]] <- thresh[1] x[x > thresh[2]] <- thresh[2] return(x) ...
/R/expr_func.R
no_license
lihualei71/RegAdjNeymanRubin
R
false
false
4,179
r
source("ols_adj.R") library("tidyverse") library("moments") thresh_entries <- function(X, tau = 0.025){ if (tau == 0){ return(X) } apply(X, 2, function(x){ thresh <- quantile(x, c(tau, 1 - tau)) x[x < thresh[1]] <- thresh[1] x[x > thresh[2]] <- thresh[2] return(x) ...
#### main #### datasetName <- reactive({ input$datasetName }) plotTypes <- reactive({ input$plotTypes }) plotTypesOpts <- reactive({ reactVals$plotTypeOptsTrigger # updates using an observer isolate({ reactVals$is_dataset_changed <- F # to distinguish plotTypes triggers getPlotTypeOpts(...
/inst/ggraptR/reactives/plotWidgetVals.R
no_license
cran/ggraptR
R
false
false
4,703
r
#### main #### datasetName <- reactive({ input$datasetName }) plotTypes <- reactive({ input$plotTypes }) plotTypesOpts <- reactive({ reactVals$plotTypeOptsTrigger # updates using an observer isolate({ reactVals$is_dataset_changed <- F # to distinguish plotTypes triggers getPlotTypeOpts(...
rm(list=ls()) #install.packages("prophet") library(prophet) library(dplyr) df <- read.csv('./example_wp_peyton_manning.csv') %>% mutate(y = log(y)) m <- prophet(df) future <- make_future_dataframe(m, period = 365) tail(df) tail(future) forecast <- predict(m, future) tail(forecast[c('ds', 'yhat', 'yhat_lower', 'yhat_...
/week5/Quick Start.R
no_license
yeolpyeong/practicalML
R
false
false
386
r
rm(list=ls()) #install.packages("prophet") library(prophet) library(dplyr) df <- read.csv('./example_wp_peyton_manning.csv') %>% mutate(y = log(y)) m <- prophet(df) future <- make_future_dataframe(m, period = 365) tail(df) tail(future) forecast <- predict(m, future) tail(forecast[c('ds', 'yhat', 'yhat_lower', 'yhat_...
/cap12_RePBIparaAnaliseEstatistica/scripts/06-Graficos.R
no_license
brunotrindademachado/DSA-PBIparaDS-v2
R
false
false
5,143
r
1ea0767f799a507e569a07579503520c par8-3-90.qdimacs 1894 4343
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Letombe/Abduction/par8-3-90/par8-3-90.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
60
r
1ea0767f799a507e569a07579503520c par8-3-90.qdimacs 1894 4343
\name{scriptRmd} \alias{scriptRmd} \title{ File script } \description{ Read the script of a file and return each line as a character chain } \usage{ scriptRmd(file, output = "code.R") } \arguments{ \item{file}{ the file path to read. } \item{output}{ the file path to write the R code. } } ...
/man/scriptRmd.Rd
no_license
cran/FactoInvestigate
R
false
false
1,017
rd
\name{scriptRmd} \alias{scriptRmd} \title{ File script } \description{ Read the script of a file and return each line as a character chain } \usage{ scriptRmd(file, output = "code.R") } \arguments{ \item{file}{ the file path to read. } \item{output}{ the file path to write the R code. } } ...
library(pROC) library(leaps) library(car) #java needs to be configurated to install and run glmulti, before running R, in the same terminal, run: #R CMD javareconf -e #echo $LD_LIBRARY_PATH #echo $JAVA_LD_LIBRARY_PATH #echo ${LD_LIBRARY_PATH}:${JAVA_LD_LIBRARY_PATH} #export LD_LIBRARY_PATH=$(echo ${LD_LIBRARY_PATH}:${...
/code_leanPhty/final_analysis/final_analysis.R
no_license
jernejaMislej/all_code
R
false
false
30,352
r
library(pROC) library(leaps) library(car) #java needs to be configurated to install and run glmulti, before running R, in the same terminal, run: #R CMD javareconf -e #echo $LD_LIBRARY_PATH #echo $JAVA_LD_LIBRARY_PATH #echo ${LD_LIBRARY_PATH}:${JAVA_LD_LIBRARY_PATH} #export LD_LIBRARY_PATH=$(echo ${LD_LIBRARY_PATH}:${...
\name{nzcathist} \alias{nzcathist} \title{New Zealand catastrophe historic} \docType{data} \description{ Historical disaster statistics in Zealand from 1968 to 2014. } \usage{ data(nzcathist) } \format{ \code{nzcathist} is a data frame of 9 columns: \describe{ \item{\code{Year}}{a numeric for the Year.} \item{...
/man/nzcathist.Rd
no_license
rmsharp/CASdatasets
R
false
false
1,428
rd
\name{nzcathist} \alias{nzcathist} \title{New Zealand catastrophe historic} \docType{data} \description{ Historical disaster statistics in Zealand from 1968 to 2014. } \usage{ data(nzcathist) } \format{ \code{nzcathist} is a data frame of 9 columns: \describe{ \item{\code{Year}}{a numeric for the Year.} \item{...
## Functions create store a matrix in cache and tests to see if ## cached matrix exists before calculating inverse. ## Function that generates a list of functions to be set, and get a matrix ## and set and get cache. Lists functions to be called by cacheSolve makeCacheMatrix <- function(x = matrix()) { m <-...
/cachematrix.R
no_license
mollyloughran/ProgrammingAssignment2
R
false
false
1,068
r
## Functions create store a matrix in cache and tests to see if ## cached matrix exists before calculating inverse. ## Function that generates a list of functions to be set, and get a matrix ## and set and get cache. Lists functions to be called by cacheSolve makeCacheMatrix <- function(x = matrix()) { m <-...
library(NetOrigin) ### Name: origin ### Title: Origin Estimation for Propagation Processes on Complex Networks ### Aliases: origin origin_backtracking origin_centrality origin_edm ### ** Examples data(delayGoe) # compute effective distance data(ptnGoe) goenet <- igraph::as_adjacency_matrix(ptnGoe, sparse=FALSE) p ...
/data/genthat_extracted_code/NetOrigin/examples/origin.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
996
r
library(NetOrigin) ### Name: origin ### Title: Origin Estimation for Propagation Processes on Complex Networks ### Aliases: origin origin_backtracking origin_centrality origin_edm ### ** Examples data(delayGoe) # compute effective distance data(ptnGoe) goenet <- igraph::as_adjacency_matrix(ptnGoe, sparse=FALSE) p ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BHAI-package.R \docType{data} \name{num_hai_patients} \alias{num_hai_patients} \title{Number of cases for each infection in the german PPS 2011 (representative sample)} \format{A PPS object.} \usage{ data(german_pps_2011_repr) } \de...
/man/num_hai_patients.Rd
no_license
cran/BHAI
R
false
true
438
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BHAI-package.R \docType{data} \name{num_hai_patients} \alias{num_hai_patients} \title{Number of cases for each infection in the german PPS 2011 (representative sample)} \format{A PPS object.} \usage{ data(german_pps_2011_repr) } \de...
\name{data8} \alias{data8} \docType{data} \title{ data8: Kaps and Lamberson (2009): page 386 } \description{ Split-plot Design. Main Plots in Randomized Blocks. An experiment was conducted in order to investigate four different treatments of pasture and two mineral supplements on milk yield. The total number of cows av...
/man/data8.Rd
no_license
cran/easyanova
R
false
false
1,120
rd
\name{data8} \alias{data8} \docType{data} \title{ data8: Kaps and Lamberson (2009): page 386 } \description{ Split-plot Design. Main Plots in Randomized Blocks. An experiment was conducted in order to investigate four different treatments of pasture and two mineral supplements on milk yield. The total number of cows av...
# create the model meta data infromation for the RCMIP II submission # https://gitlab.com/rcmip/pyrcmip/-/raw/master/tests/data/rcmip_model_metadata_test.csv?inline=false devtools::load_all() renv::restore() # Define directories. BASE_DIR <- here::here() OUT_DIR <- file.path(BASE_DIR, 'output', 'rcmipII') dir.cre...
/scripts/rcmipII/4.create-rcmip-meta_model_information.R
permissive
ashiklom/hector-rcmip
R
false
false
1,367
r
# create the model meta data infromation for the RCMIP II submission # https://gitlab.com/rcmip/pyrcmip/-/raw/master/tests/data/rcmip_model_metadata_test.csv?inline=false devtools::load_all() renv::restore() # Define directories. BASE_DIR <- here::here() OUT_DIR <- file.path(BASE_DIR, 'output', 'rcmipII') dir.cre...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 41198 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 41198 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query08_query25_1344n/query08_query25_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
720
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 41198 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 41198 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4...
######################################### # Exponential Random Graph Model # # Example Problem # # Gray's Anatomy # # # # Data: Garry Weissman, 2011 # # # ##########################...
/M12/Grays Anatomy.R
no_license
paras-a/SMA
R
false
false
2,263
r
######################################### # Exponential Random Graph Model # # Example Problem # # Gray's Anatomy # # # # Data: Garry Weissman, 2011 # # # ##########################...
# TODO: Add comment # # Author: Ben ############################################################################### source("rpecompare/ldaqda.R") source("rpecompare/rpelda.R") source("rpecompare/caret.R") source("rpecompare/basicmodel.R") # New version that doesn't deal with lists & optimized for feeding into sapply...
/rpecompare/core.R
no_license
bendotli/rpensemble
R
false
false
1,886
r
# TODO: Add comment # # Author: Ben ############################################################################### source("rpecompare/ldaqda.R") source("rpecompare/rpelda.R") source("rpecompare/caret.R") source("rpecompare/basicmodel.R") # New version that doesn't deal with lists & optimized for feeding into sapply...
#Elaborado por: Laura Donado y Jhonny Parra #2018 list.of.packages <- c("pracma","deSolve") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) library(pracma) library(deSolve) solucionODE<-function(dy, t, h, y0){ para...
/Proyecto/FuncionesRK3_RK4_VFinal.R
no_license
donadol/analisis_numerico_1826
R
false
false
3,061
r
#Elaborado por: Laura Donado y Jhonny Parra #2018 list.of.packages <- c("pracma","deSolve") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) library(pracma) library(deSolve) solucionODE<-function(dy, t, h, y0){ para...
#' Supervised Factor Conversions into Linear Functions using Likelihood Encodings #' #' `step_lencode_glm` creates a *specification* of a recipe step that #' will convert a nominal (i.e. factor) predictor into a single set of #' scores derived from a generalized linear model. #' #' @param recipe A recipe object. The ...
/R/glm.R
no_license
juliasilge/embed
R
false
false
7,139
r
#' Supervised Factor Conversions into Linear Functions using Likelihood Encodings #' #' `step_lencode_glm` creates a *specification* of a recipe step that #' will convert a nominal (i.e. factor) predictor into a single set of #' scores derived from a generalized linear model. #' #' @param recipe A recipe object. The ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{remove_data} \alias{remove_data} \title{Remove some or all downloaded additional distances datasets} \usage{ remove_data(data = NULL) } \arguments{ \item{data}{Character string or vector containing name of dataset(s)} } \des...
/man/remove_data.Rd
no_license
julianhinz/gravity.distances
R
false
true
473
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{remove_data} \alias{remove_data} \title{Remove some or all downloaded additional distances datasets} \usage{ remove_data(data = NULL) } \arguments{ \item{data}{Character string or vector containing name of dataset(s)} } \des...
generate_data = function(n,p){ covariates = matrix(rnorm(n*p,mean=0,sd=1), n, p) responses = rnorm(n, 0, 1) list(covariates, responses) } model_select = function(covariates, responses, cutoff){ retained = summary(lm(responses~covariates))$coefficients[,4][summary(lm(re...
/lab_12_simulation.R
no_license
kgchung/36-350
R
false
false
999
r
generate_data = function(n,p){ covariates = matrix(rnorm(n*p,mean=0,sd=1), n, p) responses = rnorm(n, 0, 1) list(covariates, responses) } model_select = function(covariates, responses, cutoff){ retained = summary(lm(responses~covariates))$coefficients[,4][summary(lm(re...
## White TE. Structural colours reflect individual quality: a meta-analysis ## Reset rm(list=ls()) ## Libraries library(metafor) library(PRISMAstatement) library(ape) library(rotl) library(metaAidR) library(tidyverse) ## Functions # MLMR function with common parameters, for simplicity mlmr <- funct...
/R/colmeta_analysis.R
no_license
thomased/metacol
R
false
false
8,914
r
## White TE. Structural colours reflect individual quality: a meta-analysis ## Reset rm(list=ls()) ## Libraries library(metafor) library(PRISMAstatement) library(ape) library(rotl) library(metaAidR) library(tidyverse) ## Functions # MLMR function with common parameters, for simplicity mlmr <- funct...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SetHinge.R \name{SetHinge} \alias{SetHinge} \title{Set Hinge Location in Color Palette} \usage{ SetHinge( x, hinge, scheme = "sunset", alpha = NULL, reverse = FALSE, buffer = 0, stops = c(0, 1), allow_bias = TRUE...
/man/SetHinge.Rd
permissive
cran/inlmisc
R
false
true
6,000
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SetHinge.R \name{SetHinge} \alias{SetHinge} \title{Set Hinge Location in Color Palette} \usage{ SetHinge( x, hinge, scheme = "sunset", alpha = NULL, reverse = FALSE, buffer = 0, stops = c(0, 1), allow_bias = TRUE...
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComDayCqWcmDesignimporterParserT...
/clients/r/generated/R/ComDayCqWcmDesignimporterParserTaghandlersFactoryHeadTagHandleInfo.r
permissive
shinesolutions/swagger-aem-osgi
R
false
false
4,930
r
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComDayCqWcmDesignimporterParserT...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/testRCPMM.R \name{testRCPMM} \alias{testRCPMM} \title{testRCPMM} \usage{ testRCPMM( longdata, formu, covariate = NULL, gamma = 0.1, nbnodes = 5, nbpert = 500 ) } \arguments{ \item{longdata}{A longitudinal dataset containing all va...
/man/testRCPMM.Rd
no_license
crsgls/rcpm
R
false
true
1,159
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/testRCPMM.R \name{testRCPMM} \alias{testRCPMM} \title{testRCPMM} \usage{ testRCPMM( longdata, formu, covariate = NULL, gamma = 0.1, nbnodes = 5, nbpert = 500 ) } \arguments{ \item{longdata}{A longitudinal dataset containing all va...
library(agRee) ### Name: agree.plot ### Title: Visualize the Agreement of Ratings among Different Raters ### Aliases: agree.plot ### Keywords: hplot ### ** Examples data(judgeRatings) agree.plot(judgeRatings)
/data/genthat_extracted_code/agRee/examples/agree.plot.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
220
r
library(agRee) ### Name: agree.plot ### Title: Visualize the Agreement of Ratings among Different Raters ### Aliases: agree.plot ### Keywords: hplot ### ** Examples data(judgeRatings) agree.plot(judgeRatings)
pdf("test1.pdf", width=6, height=7) par(mar=c(5,5,4,2)) mping_data <- read.table("Transposon_mPing_Ping_Pong.3k_mPing.summary", sep="\t", header=T) mping <- mping_data[,2] breaks <- seq(0,200, by=5) hist_data <- hist(mping, breaks=breaks, freq=TRUE, col="cornflowerblue", ylab="Number of strains (n=3000)", xlab="mPing c...
/Manuscript/figure/Figure1_mPing_Ping_Pong_distribution/test1.R
no_license
JinfengChen/Rice_pop
R
false
false
739
r
pdf("test1.pdf", width=6, height=7) par(mar=c(5,5,4,2)) mping_data <- read.table("Transposon_mPing_Ping_Pong.3k_mPing.summary", sep="\t", header=T) mping <- mping_data[,2] breaks <- seq(0,200, by=5) hist_data <- hist(mping, breaks=breaks, freq=TRUE, col="cornflowerblue", ylab="Number of strains (n=3000)", xlab="mPing c...
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Build and Reload Package: 'Cmd + Shift + B' # Check Package: ...
/R/hello2.R
no_license
PeteHaitch/CRANpkgB
R
false
false
448
r
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Build and Reload Package: 'Cmd + Shift + B' # Check Package: ...
# read assets from file # read portfolio from file # plot return vs risk chart # plot yearly return chart # plot cumulative return chart library(PortfolioAnalytics) library(quantmod) library(PerformanceAnalytics) library(zoo) library(plotly) library(ROI) library(DEoptim) library(doParallel) require(ROI.p...
/portfolio_n_assets_v9_example.r
no_license
murphychentw/portfolio
R
false
false
7,373
r
# read assets from file # read portfolio from file # plot return vs risk chart # plot yearly return chart # plot cumulative return chart library(PortfolioAnalytics) library(quantmod) library(PerformanceAnalytics) library(zoo) library(plotly) library(ROI) library(DEoptim) library(doParallel) require(ROI.p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/college_plots.R \name{rit_height_weight_npr} \alias{rit_height_weight_npr} \title{Makes the base template that shows the RIT space and corresponding percentile rank lines.} \usage{ rit_height_weight_npr(measurementscale, color_list = rainbow_...
/man/rit_height_weight_npr.Rd
no_license
Deerluluolivia/mapvizieR
R
false
true
1,236
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/college_plots.R \name{rit_height_weight_npr} \alias{rit_height_weight_npr} \title{Makes the base template that shows the RIT space and corresponding percentile rank lines.} \usage{ rit_height_weight_npr(measurementscale, color_list = rainbow_...
################################ # Create edx set, validation set ################################ # Note: this process could take a couple of minutes if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") if(!require(caret)) install.packages("caret", repos = "http://cran...
/Final_Projects_EDX_MovieLens.R
no_license
stevejones2010/tmp1
R
false
false
10,989
r
################################ # Create edx set, validation set ################################ # Note: this process could take a couple of minutes if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") if(!require(caret)) install.packages("caret", repos = "http://cran...
#' Model Calibration #' #' Calculate calibration estimates from observed and predicted responses. #' #' @name calibration #' @rdname calibration #' #' @param x \link[=response]{observed responses} or \link{resample} result #' containing observed and predicted responses. #' @param y \link[=predict]{predicted responses...
/R/calibration.R
no_license
brian-j-smith/MachineShop
R
false
false
10,493
r
#' Model Calibration #' #' Calculate calibration estimates from observed and predicted responses. #' #' @name calibration #' @rdname calibration #' #' @param x \link[=response]{observed responses} or \link{resample} result #' containing observed and predicted responses. #' @param y \link[=predict]{predicted responses...
#' Create customised themes for ggplot2 object #' #' This function creates a ggplot2 theme object based on my favourite templates. #' #' @param theme The name of the temaplate (blank, xkcd, more to come ...) #' #' @examples #' theme_blank <- create_ggtheme("blank") #' theme_xkcd <- create_ggtheme("xkcd") #' creat...
/R/create_ggtheme.R
permissive
rdinnager/rPlotter
R
false
false
1,443
r
#' Create customised themes for ggplot2 object #' #' This function creates a ggplot2 theme object based on my favourite templates. #' #' @param theme The name of the temaplate (blank, xkcd, more to come ...) #' #' @examples #' theme_blank <- create_ggtheme("blank") #' theme_xkcd <- create_ggtheme("xkcd") #' creat...
library(testthat) library(boostgeometry) test_check("boostgeometry")
/tests/testthat.R
no_license
jimsforks/boostgeometry
R
false
false
70
r
library(testthat) library(boostgeometry) test_check("boostgeometry")
#' @title Badanie gry przy zadanej strategii #' #' @description Funkcja wywolujaca funkcje \code{gra()} 10000 razy przy zadanej strategii i zwracajaca podstawowe statystyki #' #' @param strategia Strategia, przy ktorej ma byc badana gra #' #' @return Funkcja zwraca nastepujace statystyki: #' minimum, 1. kwartyl, med...
/R/badaj_gre.R
no_license
MarekChleb/SuperFarmerMAPA
R
false
false
628
r
#' @title Badanie gry przy zadanej strategii #' #' @description Funkcja wywolujaca funkcje \code{gra()} 10000 razy przy zadanej strategii i zwracajaca podstawowe statystyki #' #' @param strategia Strategia, przy ktorej ma byc badana gra #' #' @return Funkcja zwraca nastepujace statystyki: #' minimum, 1. kwartyl, med...
####-------------------- FUN WITH SISAL v2 ---------------------------#### # load libraries library(plyr) library(dplyr) library(tidyverse) ### load and transform data --------------------------------------### # load SISAL v2 csv files load_sisal_data <- function(prefix = "", year_start, year_stop, min_period = 600,...
/SISAL_extracting.R
no_license
ginnyweasleyIUP/202010_SISALMonitoring
R
false
false
7,094
r
####-------------------- FUN WITH SISAL v2 ---------------------------#### # load libraries library(plyr) library(dplyr) library(tidyverse) ### load and transform data --------------------------------------### # load SISAL v2 csv files load_sisal_data <- function(prefix = "", year_start, year_stop, min_period = 600,...
library(foreach) library(doParallel) library(iterators) library(MASS) library(kernlab) library(REBayes) library(ggplot2) library(gridExtra) library(TruncatedDistributions) suppressMessages(suppressWarnings(library(CVXR))) source('ksd_lib_dev.R') #------------------- Parameters ---------------------...
/Binomial/binom_k1_scenario4.R
no_license
trambakbanerjee/DLE_paper
R
false
false
7,468
r
library(foreach) library(doParallel) library(iterators) library(MASS) library(kernlab) library(REBayes) library(ggplot2) library(gridExtra) library(TruncatedDistributions) suppressMessages(suppressWarnings(library(CVXR))) source('ksd_lib_dev.R') #------------------- Parameters ---------------------...
################################################################################ ### Model fitting functions ## ## Created on: 2015-12-24 ## Author: Kazuki Yoshida ################################################################################ ## Load sandwich package for robust sandwich covariance matrix estimators ...
/function_definitions/06.FitModels.R
no_license
aashoaibi/mw
R
false
false
8,697
r
################################################################################ ### Model fitting functions ## ## Created on: 2015-12-24 ## Author: Kazuki Yoshida ################################################################################ ## Load sandwich package for robust sandwich covariance matrix estimators ...
### Loading Packages=========================== library(quantmod) library(rugarch) library(fBasics) ### Get Data and Plot price, log price and log return========================== getSymbols("CPHI", from = "2015-01-01", to = "2020-12-02") setSymbolLookup(VANKE=list(name='000002.sz',from = "2015-01-01", to = "2020-12-0...
/大数据课程/work2/work.R
no_license
Sherlock-Ni/R-Projects
R
false
false
5,346
r
### Loading Packages=========================== library(quantmod) library(rugarch) library(fBasics) ### Get Data and Plot price, log price and log return========================== getSymbols("CPHI", from = "2015-01-01", to = "2020-12-02") setSymbolLookup(VANKE=list(name='000002.sz',from = "2015-01-01", to = "2020-12-0...
## Estimate normalization factors (we want to use the entire data set) #counts.less<-counts[10001:16081,] counts.less<-counts[10001:13081,] norm.factors = estimate.norm.factors(counts.less); ## Prepare the data nb.data = prepare.nb.data(counts.less, lib.sizes = colSums(counts.less), norm.factors = norm.factors); ...
/programs/NBQ3.R
no_license
zhwr7125/Final-project-for-BIOS7695
R
false
false
1,017
r
## Estimate normalization factors (we want to use the entire data set) #counts.less<-counts[10001:16081,] counts.less<-counts[10001:13081,] norm.factors = estimate.norm.factors(counts.less); ## Prepare the data nb.data = prepare.nb.data(counts.less, lib.sizes = colSums(counts.less), norm.factors = norm.factors); ...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{pred.spline} \alias{pred.spline} \title{Predict linear spline} \usage{ pred.spline(x, lspline) } \arguments{ \item{Vector}{\code{x} of explanatory values to predict from} \item{Object}{\code{lspline} an lmspline object that contains the fitted linear spline} }...
/man/pred.spline.Rd
no_license
Creagh/linearspline
R
false
false
943
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{pred.spline} \alias{pred.spline} \title{Predict linear spline} \usage{ pred.spline(x, lspline) } \arguments{ \item{Vector}{\code{x} of explanatory values to predict from} \item{Object}{\code{lspline} an lmspline object that contains the fitted linear spline} }...
# # 「輿情監控日報」關鍵字加權排序 # # Usage: # # 依據「關鍵字清單」中的「關鍵字」與「權重」設定,以及關鍵字出現在 raw data # (下載自 OpView)每列「標題」與「內容」欄位的次數,先計算出中每一列的「加 # 權總計」(WeightSum)。然後再依據每一列的「加權總計」 欄位值,由高而低進行 # 排序,最後再產出排序後的 raw data。 # # Features: # # 1. 可依據需求,自由調整「關鍵字」於「標題」或「內容」欄位的權重。針對想特別 # 關注的關鍵字,可增加其在「標題」或「內容」欄位的權重,以使排序提前。 # # 2. 依據「加權總計」欄位 ...
/R/PublicOpinionMonitor/SortByKeywordWeight.R
no_license
desp0916/misc
R
false
false
7,040
r
# # 「輿情監控日報」關鍵字加權排序 # # Usage: # # 依據「關鍵字清單」中的「關鍵字」與「權重」設定,以及關鍵字出現在 raw data # (下載自 OpView)每列「標題」與「內容」欄位的次數,先計算出中每一列的「加 # 權總計」(WeightSum)。然後再依據每一列的「加權總計」 欄位值,由高而低進行 # 排序,最後再產出排序後的 raw data。 # # Features: # # 1. 可依據需求,自由調整「關鍵字」於「標題」或「內容」欄位的權重。針對想特別 # 關注的關鍵字,可增加其在「標題」或「內容」欄位的權重,以使排序提前。 # # 2. 依據「加權總計」欄位 ...
# Import ANFR data 2016 dat = read.csv(file="Cartoradio2016.csv",head=TRUE,sep=";",dec=",",encoding="latin1") colnames(dat) = c('operator', 'id', 'system', 'datestr', 'department', 'generation', 'lat', 'lon','address', 'postal', 'ville', 'insee') dat$datestr = as.Date(dat$datestr, format="%d/%m/%y") # Size of dataset ...
/data/post2014/anfr/main.R
permissive
yutec/FightBrand
R
false
false
1,124
r
# Import ANFR data 2016 dat = read.csv(file="Cartoradio2016.csv",head=TRUE,sep=";",dec=",",encoding="latin1") colnames(dat) = c('operator', 'id', 'system', 'datestr', 'department', 'generation', 'lat', 'lon','address', 'postal', 'ville', 'insee') dat$datestr = as.Date(dat$datestr, format="%d/%m/%y") # Size of dataset ...
# Test UpSet endpoints # Setup ------------------------------------------------------------------------ source("tinytestSettings.R") using(ttdo) library(OmicNavigator) testStudyName <- "ABC" testStudyObj <- OmicNavigator:::testStudy( name = testStudyName, version = "0.3", nFeatures = 1000 ) testStudyObj <- ad...
/inst/tinytest/testUpset.R
permissive
bengalengel/OmicNavigator
R
false
false
21,762
r
# Test UpSet endpoints # Setup ------------------------------------------------------------------------ source("tinytestSettings.R") using(ttdo) library(OmicNavigator) testStudyName <- "ABC" testStudyObj <- OmicNavigator:::testStudy( name = testStudyName, version = "0.3", nFeatures = 1000 ) testStudyObj <- ad...
################################################################################ ## ## ## Extend a tx2gene table with transcript only included in the gtf file ## ## ...
/Rscripts/extend_tx2gene.R
permissive
csoneson/annotation_problem_txabundance
R
false
false
2,233
r
################################################################################ ## ## ## Extend a tx2gene table with transcript only included in the gtf file ## ## ...
plot2 <- function(x){ print("Reading household_power_consumption.txt ...") e_data <- read.table("household_power_consumption.txt", sep=";", header=TRUE,colClasses = c("character" , "character" ,rep("numeric",1,7)), na.strings="?" ) ## Convert Time from charater to date/time type print("Converting Time ...") e_dat...
/plot2.R
no_license
jansep/ExData_Plotting1
R
false
false
928
r
plot2 <- function(x){ print("Reading household_power_consumption.txt ...") e_data <- read.table("household_power_consumption.txt", sep=";", header=TRUE,colClasses = c("character" , "character" ,rep("numeric",1,7)), na.strings="?" ) ## Convert Time from charater to date/time type print("Converting Time ...") e_dat...
#--------------------------------------------------------------------- # Project title: Creating movie of simulated movement # Project: Detector Project # # Author: Elizabeth Moorcroft ...
/Movie script.R
no_license
ElizabethMoorcroft/RAnalysis
R
false
false
5,035
r
#--------------------------------------------------------------------- # Project title: Creating movie of simulated movement # Project: Detector Project # # Author: Elizabeth Moorcroft ...
#' Project all trees on one tree and plot it #' #' Visualization of the ensemble of trees as a single collective unit. #' #' @param model dump generated by the \code{xgb.train} function. #' @param feature_names names of each feature as a \code{character} vector. Can be extracted from a sparse matrix (see example). If ...
/R-package/R/xgb.plot.multi.trees.R
permissive
zoucuomiao/xgboost
R
false
false
5,283
r
#' Project all trees on one tree and plot it #' #' Visualization of the ensemble of trees as a single collective unit. #' #' @param model dump generated by the \code{xgb.train} function. #' @param feature_names names of each feature as a \code{character} vector. Can be extracted from a sparse matrix (see example). If ...
\name{cv_partition} \alias{cv_partition} \title{Randomly partitions data for cross-validation.} \usage{ cv_partition(y, num_folds = 10, hold_out = NULL, seed = NULL) } \arguments{ \item{y}{a vector of class labels} \item{num_folds}{the number of cross-validation folds. Ignored if \code{hold_out} is not \co...
/man/cv_partition.Rd
no_license
wfudong/sparsediscrim
R
false
false
1,631
rd
\name{cv_partition} \alias{cv_partition} \title{Randomly partitions data for cross-validation.} \usage{ cv_partition(y, num_folds = 10, hold_out = NULL, seed = NULL) } \arguments{ \item{y}{a vector of class labels} \item{num_folds}{the number of cross-validation folds. Ignored if \code{hold_out} is not \co...
### File R/gvis.R ### Part of the R package googleVis ### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo ### Distributed under GPL 2 or later ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. #...
/BurdenOfDiseasesShiny/gvis.R
permissive
DrRoad/Public_ScotGovAccelerator_2018
R
false
false
22,328
r
### File R/gvis.R ### Part of the R package googleVis ### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo ### Distributed under GPL 2 or later ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later version, ### incorporated herein by reference. #...
/R/check_functions/plot_traj_data_gif_jorge.R
no_license
jfloresvaliente/ichthyop_analysis
R
false
false
1,839
r
#makes a plot and writes it to plot2.png #read sample of file to check how it looks like sample <- read.table("household_power_consumption.txt", header=TRUE, nrows = 50) sample2 <- read.table("household_power_consumption.txt", header=TRUE, nrows = 50, sep =";") col_numb <- ncol(sample2) #read only Date column date <...
/plot2.R
no_license
ATypiak/ExData_Plotting1
R
false
false
1,397
r
#makes a plot and writes it to plot2.png #read sample of file to check how it looks like sample <- read.table("household_power_consumption.txt", header=TRUE, nrows = 50) sample2 <- read.table("household_power_consumption.txt", header=TRUE, nrows = 50, sep =";") col_numb <- ncol(sample2) #read only Date column date <...
# attachBestOverlaps.R # # Package: t2d # Author: Richard D Pearson # Email: richard.pearson@well.ox.ac.uk # ############################################################################### attachBestOverlaps <- function( vcf, subjectVcf, infoFieldsToIncludeFromSubj = names(values(info(subjectVcf))), # infoFie...
/R/attachBestOverlaps.R
no_license
podpearson/got2dsv
R
false
false
22,644
r
# attachBestOverlaps.R # # Package: t2d # Author: Richard D Pearson # Email: richard.pearson@well.ox.ac.uk # ############################################################################### attachBestOverlaps <- function( vcf, subjectVcf, infoFieldsToIncludeFromSubj = names(values(info(subjectVcf))), # infoFie...
source('framework/data.R'); source('framework/backtester.R') source('framework/processResults.R'); source('strategies/W%R(pos-P&R).R') numOfDays <- 550 dataList <- getData(directory="PART1") dataList <- lapply(dataList, function(x) x[1:numOfDays]) sMult <- 0.2 # slippage multiplier thresholdSeq <- seq(from=20,to=5...
/backtester_v4.2/main_optimize3.R
no_license
whyVeronica/backtester_v4.2
R
false
false
1,223
r
source('framework/data.R'); source('framework/backtester.R') source('framework/processResults.R'); source('strategies/W%R(pos-P&R).R') numOfDays <- 550 dataList <- getData(directory="PART1") dataList <- lapply(dataList, function(x) x[1:numOfDays]) sMult <- 0.2 # slippage multiplier thresholdSeq <- seq(from=20,to=5...
### Required packages ### library(ggplot2); library(dplyr); library(tidyr);library(haven);library(readstata13);library(foreign);library(data.table);library(questionr);library(expss) ############################# ##### Variables to Keep ##### ############################# wave4.5_vars = c("CASEID","PERSONID","X04R_Y_...
/PATH/Wave4.5/Process.R
no_license
bryansashakim/JUUL
R
false
false
1,669
r
### Required packages ### library(ggplot2); library(dplyr); library(tidyr);library(haven);library(readstata13);library(foreign);library(data.table);library(questionr);library(expss) ############################# ##### Variables to Keep ##### ############################# wave4.5_vars = c("CASEID","PERSONID","X04R_Y_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{poly_syn} \alias{poly_syn} \alias{Synonyms_Polypeptide_Carrier_Drug} \alias{Synonyms_Polypeptides_Enzyme_Drug} \alias{Synonyms_Polypeptide_Target_Drug} \alias{Synonyms_Polypeptide_Transporter_Drug} \title{Polypepti...
/man/poly_syn.Rd
no_license
cran/covid19dbcand
R
false
true
1,359
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{poly_syn} \alias{poly_syn} \alias{Synonyms_Polypeptide_Carrier_Drug} \alias{Synonyms_Polypeptides_Enzyme_Drug} \alias{Synonyms_Polypeptide_Target_Drug} \alias{Synonyms_Polypeptide_Transporter_Drug} \title{Polypepti...
#Used to make the Weighted Unifrac Box plots for the blueberry data library(ggplot2) setwd("/home/jacob/projects/DenoiseCompare_Out/Blueberry/med/COMBINED/plots/bdiv-new/") par=(mfrow=c(2,2)) # Read in matrix of weighted unifrac distances at ASV level for samples across all 3 pipelines. DM <- read.table("weighted_un...
/Rscripts/Old_Scripts/Weighted_Unifrac_Blueberry.R
no_license
nearinj/Denoiser-Comparison
R
false
false
8,800
r
#Used to make the Weighted Unifrac Box plots for the blueberry data library(ggplot2) setwd("/home/jacob/projects/DenoiseCompare_Out/Blueberry/med/COMBINED/plots/bdiv-new/") par=(mfrow=c(2,2)) # Read in matrix of weighted unifrac distances at ASV level for samples across all 3 pipelines. DM <- read.table("weighted_un...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/annotatr.r \name{read_gff} \alias{read_gff} \title{Read a GFF file} \usage{ read_gff(file) } \arguments{ \item{file}{the GFF file (can be gzipped) to read in. Read in a GFF file. This will not parse the attributes column, as lazyily extract...
/man/read_gff.Rd
no_license
vsbuffalo/annotatr
R
false
true
394
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/annotatr.r \name{read_gff} \alias{read_gff} \title{Read a GFF file} \usage{ read_gff(file) } \arguments{ \item{file}{the GFF file (can be gzipped) to read in. Read in a GFF file. This will not parse the attributes column, as lazyily extract...
# An application for viewing and scoring RMD/HTML/R files library(shiny) library(gitgrade) shinyServer(function(input, output, session) { update_file_choices <- observe({ new_names <- format_file_names(COMMIT_LOG, id = input$which_student, assignment = input...
/inst/ViewR/server.R
no_license
jayleetx/gitgrade
R
false
false
6,750
r
# An application for viewing and scoring RMD/HTML/R files library(shiny) library(gitgrade) shinyServer(function(input, output, session) { update_file_choices <- observe({ new_names <- format_file_names(COMMIT_LOG, id = input$which_student, assignment = input...
#' @import shiny app_ui <- function() { version <- paste0("v", packageVersion("coronavirus")) tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here f7Page( title = "Coronavirus", dark_mode = TRUE, init...
/R/app_ui.R
permissive
NMackay-phe/coronavirus
R
false
false
7,304
r
#' @import shiny app_ui <- function() { version <- paste0("v", packageVersion("coronavirus")) tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here f7Page( title = "Coronavirus", dark_mode = TRUE, init...
mcCovMat.Bbdpars <- function(object,nsim=100,seed=NULL,maxit=1000) { if(is.null(seed)) seed <- sample(1:1e5,1) set.seed(seed) par0 <- unlist(object[1:2]) simdat <- simulate(object,nsim=nsim) fitz <- lapply(simdat,mleBb,size=attr(object,"size"), par0=par0,maxit=maxit,covmat=F...
/R/mcCovMat.Bbdpars.R
no_license
cran/dbd
R
false
false
363
r
mcCovMat.Bbdpars <- function(object,nsim=100,seed=NULL,maxit=1000) { if(is.null(seed)) seed <- sample(1:1e5,1) set.seed(seed) par0 <- unlist(object[1:2]) simdat <- simulate(object,nsim=nsim) fitz <- lapply(simdat,mleBb,size=attr(object,"size"), par0=par0,maxit=maxit,covmat=F...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sfn_operations.R \name{sfn_describe_state_machine_for_execution} \alias{sfn_describe_state_machine_for_execution} \title{Describes the state machine associated with a specific execution} \usage{ sfn_describe_state_machine_for_execution(execut...
/paws/man/sfn_describe_state_machine_for_execution.Rd
permissive
sanchezvivi/paws
R
false
true
871
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sfn_operations.R \name{sfn_describe_state_machine_for_execution} \alias{sfn_describe_state_machine_for_execution} \title{Describes the state machine associated with a specific execution} \usage{ sfn_describe_state_machine_for_execution(execut...
#' cytoPlot #' #' A plot wrapper for cytometries as a mixture of multivariate normals as used in optimalFlowTemplates. #' #' @param cytometry.as.mixture A list, where each element contains the parameters of a component of the mixture as a list with entries: mean, cov, weight and type. #' @param dimensions A vector...
/R/cytoPlot.R
no_license
HristoInouzhe/optimalFlow
R
false
false
2,104
r
#' cytoPlot #' #' A plot wrapper for cytometries as a mixture of multivariate normals as used in optimalFlowTemplates. #' #' @param cytometry.as.mixture A list, where each element contains the parameters of a component of the mixture as a list with entries: mean, cov, weight and type. #' @param dimensions A vector...
f <- function(field, n, chunk_size = 100){ seq(1, n, chunk_size) %>% purrr::map_dfr( .x = ., .f = function(x){ tibble::tibble( start = x, stop = x + (chunk_size - 1) ) %>% dplyr::mutate( field = field, start = dplyr::if_else(start >...
/R/extract.R
permissive
joekirincic/xprtr
R
false
false
1,466
r
f <- function(field, n, chunk_size = 100){ seq(1, n, chunk_size) %>% purrr::map_dfr( .x = ., .f = function(x){ tibble::tibble( start = x, stop = x + (chunk_size - 1) ) %>% dplyr::mutate( field = field, start = dplyr::if_else(start >...
################################################################################################# ### This script harvests the templates created for the different LTER and international sites ### ### that were selected by the LTER working group Stream Elemental Cycling ### ##########################...
/template_harvester.R
permissive
lter/lterwg-sec
R
false
false
21,844
r
################################################################################################# ### This script harvests the templates created for the different LTER and international sites ### ### that were selected by the LTER working group Stream Elemental Cycling ### ##########################...
## Mean layers ## Set working directory setwd("~/RAATD_01/RAATD/allSpRasters") library(raster) # -------------------------------------------- # Function to load raster layers for all species and write them to a single folder stkR <- function(sp, colony.weighted = FALSE) { fls <- list.files(paste0("../", sp, "/modP...
/Code/writeRastersOneFolder.R
no_license
SCAR/RAATD
R
false
false
1,248
r
## Mean layers ## Set working directory setwd("~/RAATD_01/RAATD/allSpRasters") library(raster) # -------------------------------------------- # Function to load raster layers for all species and write them to a single folder stkR <- function(sp, colony.weighted = FALSE) { fls <- list.files(paste0("../", sp, "/modP...
#' BG Envelope #' #' Calculates the envelope (bounding box) of a geometry #' #' @inheritParams bg_area #' #' @examples #' polygon <- "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3), (4.0 2.0, 4.2 1.4, 4.8 1.9, 4.4 2.2, 4.0 2.0))" #' bg_envelope(polygon) #' #' bg_envelo...
/R/algorithm_envelope.R
no_license
jimsforks/boostgeometry
R
false
false
685
r
#' BG Envelope #' #' Calculates the envelope (bounding box) of a geometry #' #' @inheritParams bg_area #' #' @examples #' polygon <- "POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3), (4.0 2.0, 4.2 1.4, 4.8 1.9, 4.4 2.2, 4.0 2.0))" #' bg_envelope(polygon) #' #' bg_envelo...
############################################CLIMATE GENERATOR MODEL#################################################### CLIMATE_GENERATOR <- function(mean_prcp_change_percent,mean_temp_change_celsius,num_year,climateData) { #THIS SCRIPT PRODUCES MONTHLY CLIMATE DATA library(maps) library(mapproj) library...
/app/CLIMATE_GENERATOR_WEB.r
permissive
HydrosystemsGroup/ViRTUE
R
false
false
3,710
r
############################################CLIMATE GENERATOR MODEL#################################################### CLIMATE_GENERATOR <- function(mean_prcp_change_percent,mean_temp_change_celsius,num_year,climateData) { #THIS SCRIPT PRODUCES MONTHLY CLIMATE DATA library(maps) library(mapproj) library...
test_that("symbols weights are dropped in output", { df <- copy_to_test("sqlite", tibble(x = 1, w = 1)) expect_equal(dbplyr_uncount(df, w) %>% collect(), tibble(x = 1)) expect_snapshot( dbplyr_uncount(df, w) %>% show_query(), transform = function(lines) { lines_to_transform <- grepl("INNER JOIN", l...
/tests/testthat/test-verb-uncount.R
permissive
tidyverse/dbplyr
R
false
false
2,070
r
test_that("symbols weights are dropped in output", { df <- copy_to_test("sqlite", tibble(x = 1, w = 1)) expect_equal(dbplyr_uncount(df, w) %>% collect(), tibble(x = 1)) expect_snapshot( dbplyr_uncount(df, w) %>% show_query(), transform = function(lines) { lines_to_transform <- grepl("INNER JOIN", l...
library("knitr") library("rgl") #knit("dimethomorph.Rmd") #markdownToHTML('dimethomorph.md', 'dimethomorph.html', options=c("use_xhml")) #system("pandoc -s dimethomorph.html -o dimethomorph.pdf") knit2html('dimethomorph.Rmd')
/FDA_Pesticide_Glossary/dimethomorph.R
permissive
andrewdefries/andrewdefries.github.io
R
false
false
228
r
library("knitr") library("rgl") #knit("dimethomorph.Rmd") #markdownToHTML('dimethomorph.md', 'dimethomorph.html', options=c("use_xhml")) #system("pandoc -s dimethomorph.html -o dimethomorph.pdf") knit2html('dimethomorph.Rmd')
# based on get.both.p.vals of 2018-02-10-fixed-mixed-p-values.R extract.p.val <- function(mtype = "wnlm.Q", gene = "MEST", coef = "Age", M) { errfun <- function(e) NA data.frame(Model = mtype, Gene = gene, Coefficient = coef, p.val = tryCatch(summary(M[[c(mtype, gene)]])$coefficients[coef , 4], ...
/notebook/2018-02-10-fixed-mixed-p-values/2018-02-10-fixed-mixed-p-values.R
no_license
attilagk/monoallelic-brain-research
R
false
false
2,280
r
# based on get.both.p.vals of 2018-02-10-fixed-mixed-p-values.R extract.p.val <- function(mtype = "wnlm.Q", gene = "MEST", coef = "Age", M) { errfun <- function(e) NA data.frame(Model = mtype, Gene = gene, Coefficient = coef, p.val = tryCatch(summary(M[[c(mtype, gene)]])$coefficients[coef , 4], ...
# This file is automatically generated, you probably don't want to edit this ttestPSOptions <- if (requireNamespace('jmvcore')) R6::R6Class( "ttestPSOptions", inherit = jmvcore::Options, public = list( initialize = function( pairs = NULL, students = TRUE, bf = F...
/R/ttestps.h.R
no_license
lago1970/jmv
R
false
false
21,464
r
# This file is automatically generated, you probably don't want to edit this ttestPSOptions <- if (requireNamespace('jmvcore')) R6::R6Class( "ttestPSOptions", inherit = jmvcore::Options, public = list( initialize = function( pairs = NULL, students = TRUE, bf = F...
############ Measuring movements distances from telemetry GPS data ########### library(riverdist) library(sp) library(rgdal) ############################################################################### ############################################################################### ################################...
/MovementCode.R
no_license
Wagner-Fish-Lab/TroutMovement
R
false
false
4,507
r
############ Measuring movements distances from telemetry GPS data ########### library(riverdist) library(sp) library(rgdal) ############################################################################### ############################################################################### ################################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.bm.R \name{summary.bm} \alias{summary.bm} \title{summary.bm} \usage{ \method{summary}{bm}(object, opt = "navg", logit = "all", ...) } \arguments{ \item{object}{element of the class "blockmediate".} \item{opt}{a character string indic...
/man/summary.bm.Rd
no_license
AllanJe/multimediate
R
false
true
939
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.bm.R \name{summary.bm} \alias{summary.bm} \title{summary.bm} \usage{ \method{summary}{bm}(object, opt = "navg", logit = "all", ...) } \arguments{ \item{object}{element of the class "blockmediate".} \item{opt}{a character string indic...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/upset.R \name{upset} \alias{upset} \title{UpSetR Plot} \usage{ upset(data, nsets = 5, nintersects = 40, sets = NULL, matrix.color = "gray23", main.bar.color = "gray23", sets.bar.color = "gray23", point.size = 4, line.size = 1, n...
/man/upset.Rd
no_license
bobfridley/UpSetR
R
false
false
7,504
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/upset.R \name{upset} \alias{upset} \title{UpSetR Plot} \usage{ upset(data, nsets = 5, nintersects = 40, sets = NULL, matrix.color = "gray23", main.bar.color = "gray23", sets.bar.color = "gray23", point.size = 4, line.size = 1, n...
/India/India_Viz.R
permissive
JediPro/Visualization_Practice_R
R
false
false
8,312
r
#' Interpolation of Missing Data in a Pollen Database by Different Methods #' #' Function to simultaneously replace all missing data of an historical database of several pollen types by using different methods of interpolation. #' #' @param data A \code{data.frame} object including the general database where interp...
/R/interpollen.R
no_license
aerobiology/AeRobiology
R
false
false
27,194
r
#' Interpolation of Missing Data in a Pollen Database by Different Methods #' #' Function to simultaneously replace all missing data of an historical database of several pollen types by using different methods of interpolation. #' #' @param data A \code{data.frame} object including the general database where interp...