content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
library(lme4) library(lmerTest) library(MuMIn) # make regression table # NDVI, NDVI.CA, NDVI.CI, NDVI.ND, NDVI.ND.CA, NDVI.ND.CI scaled <- as.data.frame(scale(prairie.bio[,81:123])) scaled$Plot.category <- prairie.bio$Plot.category scaled$TMT.use <- prairie.bio$TMT.use scaled$biomass.all <- scale(prairie.bio$biomass....
/SCRIPTS/05a.regression.summary.biomass.R
no_license
lanescher/prairie-remote-sensing-2020
R
false
false
21,256
r
library(lme4) library(lmerTest) library(MuMIn) # make regression table # NDVI, NDVI.CA, NDVI.CI, NDVI.ND, NDVI.ND.CA, NDVI.ND.CI scaled <- as.data.frame(scale(prairie.bio[,81:123])) scaled$Plot.category <- prairie.bio$Plot.category scaled$TMT.use <- prairie.bio$TMT.use scaled$biomass.all <- scale(prairie.bio$biomass....
#' profile #' #' @param mod object of class \code{flexmix} #' @param data data obeject of \code{data.recode} #' @return a list with component #' \item{dfPlt}{data frame used in profile plot (without split of continuous&ordinal)} #' \item{dfPro}{data frame of profile} #' \item{dfPrM}{data frame of probMean} #' ...
/07.25 Shiny 0.1.0/fmclust/R/profile.R
no_license
SheliaXin/Latent-Class-Clustering
R
false
false
4,731
r
#' profile #' #' @param mod object of class \code{flexmix} #' @param data data obeject of \code{data.recode} #' @return a list with component #' \item{dfPlt}{data frame used in profile plot (without split of continuous&ordinal)} #' \item{dfPro}{data frame of profile} #' \item{dfPrM}{data frame of probMean} #' ...
# Clear Workspace rm(list=ls()) # load packages library(formatR) library(nbastatR) library(mvoutlier) library(Rtsne) library(ggplot2) # Read Data bDat <- bref_players_stats(seasons = 2017, tables = c("advanced", "per_minute", "totals"), only_totals = FALSE, join_data = TRUE, assign_to_environment =...
/getData.R
permissive
georgeblck/nba-outliers
R
false
false
1,653
r
# Clear Workspace rm(list=ls()) # load packages library(formatR) library(nbastatR) library(mvoutlier) library(Rtsne) library(ggplot2) # Read Data bDat <- bref_players_stats(seasons = 2017, tables = c("advanced", "per_minute", "totals"), only_totals = FALSE, join_data = TRUE, assign_to_environment =...
#' DNAm age estimation using different DNA methylation clocks. #' @param x data.frame (Individual in columns, CpGs in rows, CpG names in #' first colum - i.e. Horvath's format), matrix (individuals in columns and #' Cpgs in rows having CpG names in the rownames), ExpressionSet or #' GenomicRatioSet. #' @param c...
/R/DNAmAge.R
permissive
alaindomissy/methylclock
R
false
false
10,309
r
#' DNAm age estimation using different DNA methylation clocks. #' @param x data.frame (Individual in columns, CpGs in rows, CpG names in #' first colum - i.e. Horvath's format), matrix (individuals in columns and #' Cpgs in rows having CpG names in the rownames), ExpressionSet or #' GenomicRatioSet. #' @param c...
#' Visualize a cluster analysis #' #' @param features A data.frame or matrix representing the features that #' are plotted. Must have two columns. #' @param clustering A vector representing the clustering #' @param within_connection Boolean. Connect the elements within each #' clusters through lines? Useful to...
/R/plotting.R
permissive
unDocUMeantIt/anticlust
R
false
false
7,979
r
#' Visualize a cluster analysis #' #' @param features A data.frame or matrix representing the features that #' are plotted. Must have two columns. #' @param clustering A vector representing the clustering #' @param within_connection Boolean. Connect the elements within each #' clusters through lines? Useful to...
model1 <- function(B,tau,seed,x,y){ ################regression################### func1 <- glm(y ~Temperature+Humidity+Wind_speed+ Visibility+Dew_point_temperature+Solar_Radiation+Rainfall+Snowfall+Autumn+Spring+Summer+holiday+functioningday,data=df,family = poisson(link='log')) # bhat <- coef(func1) vb...
/Seoul bike analysis using Bayesian poisson regression/model1_update.R
no_license
JM3309/Projects
R
false
false
1,058
r
model1 <- function(B,tau,seed,x,y){ ################regression################### func1 <- glm(y ~Temperature+Humidity+Wind_speed+ Visibility+Dew_point_temperature+Solar_Radiation+Rainfall+Snowfall+Autumn+Spring+Summer+holiday+functioningday,data=df,family = poisson(link='log')) # bhat <- coef(func1) vb...
library("flowCore") library("hypergate") library("sp") library("shinyjs") logiclTransformCiphe <- function(flow.frame) { ####################################################################################################### # # # # # ##############################################################...
/server.R
no_license
cipheLab/hypergateShiny
R
false
false
14,294
r
library("flowCore") library("hypergate") library("sp") library("shinyjs") logiclTransformCiphe <- function(flow.frame) { ####################################################################################################### # # # # # ##############################################################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tcu_APG-data.R \docType{data} \name{TCU_APG} \alias{TCU_APG} \alias{tcu_APG} \title{Número de Alunos da Pós-Graduação da UFERSA (2017.1-2017.2) - TCU} \format{Data frame com 17 linhas e 5 colunas.} \usage{ data(TCU_APG) } \description{ Número...
/man/TCU_APG.Rd
no_license
Kassio-Ferreira/dadosUfersa
R
false
true
624
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tcu_APG-data.R \docType{data} \name{TCU_APG} \alias{TCU_APG} \alias{tcu_APG} \title{Número de Alunos da Pós-Graduação da UFERSA (2017.1-2017.2) - TCU} \format{Data frame com 17 linhas e 5 colunas.} \usage{ data(TCU_APG) } \description{ Número...
# R script for Peak Model # -- generated by MACS p <- c(0.0321835543587,0.0374335479329,0.0424009897696,0.0479973370866,0.0531744140834,0.0531744140834,0.05341139296,0.0532017577999,0.0530832683616,0.0530285809286,0.0528918623459,0.0530923829338,0.0533840492435,0.0537486321306,0.0540494130124,0.0542134753116,0.0545233...
/NF-kB_sites/MACS2_p65_peaks/HUVEC_TNFvsASIS_model.r
no_license
NickPanyushev/R_stuff
R
false
false
78,003
r
# R script for Peak Model # -- generated by MACS p <- c(0.0321835543587,0.0374335479329,0.0424009897696,0.0479973370866,0.0531744140834,0.0531744140834,0.05341139296,0.0532017577999,0.0530832683616,0.0530285809286,0.0528918623459,0.0530923829338,0.0533840492435,0.0537486321306,0.0540494130124,0.0542134753116,0.0545233...
library(ape) testtree <- read.tree("13024_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="13024_0_unrooted.txt")
/codeml_files/newick_trees_processed/13024_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("13024_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="13024_0_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LexisNexisTools.R \docType{methods} \name{LNToutput_methods} \alias{LNToutput_methods} \alias{dim,LNToutput-method} \alias{show,LNToutput-method} \alias{[,LNToutput,ANY,ANY,ANY-method} \alias{+,LNToutput,LNToutput-method} \title{Methods for L...
/man/LNToutput_methods.Rd
no_license
faisalnawazmir/LexisNexisTools
R
false
true
892
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LexisNexisTools.R \docType{methods} \name{LNToutput_methods} \alias{LNToutput_methods} \alias{dim,LNToutput-method} \alias{show,LNToutput-method} \alias{[,LNToutput,ANY,ANY,ANY-method} \alias{+,LNToutput,LNToutput-method} \title{Methods for L...
#' The function for hierarchical imputation of continuous variables. #' #' The function is called by the wrapper. #' @param y_imp A Vector with the variable to impute. #' @param X_imp A data.frame with the fixed effects variables. #' @param Z_imp A data.frame with the random effects variables. #' @param clID A vector w...
/R/hmi_imp_cont_multi_2017-09-03.R
no_license
matthiasspeidel/hmi
R
false
false
6,279
r
#' The function for hierarchical imputation of continuous variables. #' #' The function is called by the wrapper. #' @param y_imp A Vector with the variable to impute. #' @param X_imp A data.frame with the fixed effects variables. #' @param Z_imp A data.frame with the random effects variables. #' @param clID A vector w...
library(shiny) shinyServer(function(input, output, session) { getdata <- reactive({ if(is.null(input$uploaded)){ read.table("http://www.meteo.psu.edu/holocene/public_html/shared/research/ONLINE-PREPRINTS/Millennium/DATA/RECONS/nhem-recon.dat" , col.names=c("year","tem...
/ShinyApp/server.R
permissive
yongjun21/DevelopDataProducts
R
false
false
3,598
r
library(shiny) shinyServer(function(input, output, session) { getdata <- reactive({ if(is.null(input$uploaded)){ read.table("http://www.meteo.psu.edu/holocene/public_html/shared/research/ONLINE-PREPRINTS/Millennium/DATA/RECONS/nhem-recon.dat" , col.names=c("year","tem...
###### SPATIO-TEMPORAL RAINFALL PATTERNS IN KAPUAS BASIN ###### ### ANALYSIS AND COMPARISON OF GAUGE DATA ### ## analyse.R ## plots summaries to output files #### SET UP #### source("scripts/setup.R") source("scripts/graphic_pars.R") ### #### SIMPLE TS PLOTS AND SUMMARY STATISTICS #### fpath="output/timeserie...
/scripts/analyse.R
no_license
frydolin/rainfall_analysis_kapuas
R
false
false
16,308
r
###### SPATIO-TEMPORAL RAINFALL PATTERNS IN KAPUAS BASIN ###### ### ANALYSIS AND COMPARISON OF GAUGE DATA ### ## analyse.R ## plots summaries to output files #### SET UP #### source("scripts/setup.R") source("scripts/graphic_pars.R") ### #### SIMPLE TS PLOTS AND SUMMARY STATISTICS #### fpath="output/timeserie...
#' appbot_versions #' #' Allows you to get versions data from the Appbot API (iOS only) #' @param app_id The ID of the app you want to check #' @param start The start date you want to call in YYYY-MM-DD format #' @param end The end date you want to call in YYYY-MM-DD format #' @param country The ID of the country to fi...
/R/appbot_versions.R
permissive
neugelb/rappbot
R
false
false
2,475
r
#' appbot_versions #' #' Allows you to get versions data from the Appbot API (iOS only) #' @param app_id The ID of the app you want to check #' @param start The start date you want to call in YYYY-MM-DD format #' @param end The end date you want to call in YYYY-MM-DD format #' @param country The ID of the country to fi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/goalmodel_predict.R \name{p1x2} \alias{p1x2} \title{Compute 1x2 probabilities from expected goals.} \usage{ p1x2(expg1, expg2, model = "poisson", dispersion = NULL, rho = NULL, uprx = 25) } \arguments{ \item{expg1}{Non-negative numeric. The e...
/man/p1x2.Rd
no_license
opisthokonta/goalmodel
R
false
true
987
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/goalmodel_predict.R \name{p1x2} \alias{p1x2} \title{Compute 1x2 probabilities from expected goals.} \usage{ p1x2(expg1, expg2, model = "poisson", dispersion = NULL, rho = NULL, uprx = 25) } \arguments{ \item{expg1}{Non-negative numeric. The e...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modules-contrasts-ui.R \name{bulkTableOuput} \alias{bulkTableOuput} \title{Tables for datasets page} \usage{ bulkTableOuput(id) } \description{ Tables for datasets page } \keyword{internal}
/man/bulkTableOuput.Rd
no_license
alexvpickering/crossmeta
R
false
true
268
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modules-contrasts-ui.R \name{bulkTableOuput} \alias{bulkTableOuput} \title{Tables for datasets page} \usage{ bulkTableOuput(id) } \description{ Tables for datasets page } \keyword{internal}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/amaretto_initialize.R \name{FindTranscriptionallyPredictive_CNV} \alias{FindTranscriptionallyPredictive_CNV} \title{FindTranscriptionallyPredictive_CNV} \usage{ FindTranscriptionallyPredictive_CNV(MA_matrix, CNV_matrix, PvalueThreshold = 0....
/man/FindTranscriptionallyPredictive_CNV.Rd
permissive
liefeld/AMARETTO
R
false
true
971
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/amaretto_initialize.R \name{FindTranscriptionallyPredictive_CNV} \alias{FindTranscriptionallyPredictive_CNV} \title{FindTranscriptionallyPredictive_CNV} \usage{ FindTranscriptionallyPredictive_CNV(MA_matrix, CNV_matrix, PvalueThreshold = 0....
library(mstR) ### Name: thetaEst ### Title: Ability estimation (dichotomous and polytomous models) ### Aliases: thetaEst ### ** Examples ## Dichotomous models ## # Generation of an item bank under 3PL with 100 items m.3PL <- genDichoMatrix(100, model = "3PL") m.3PL <- as.matrix(m.3PL) # Creation of a respo...
/data/genthat_extracted_code/mstR/examples/thetaEst.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
4,495
r
library(mstR) ### Name: thetaEst ### Title: Ability estimation (dichotomous and polytomous models) ### Aliases: thetaEst ### ** Examples ## Dichotomous models ## # Generation of an item bank under 3PL with 100 items m.3PL <- genDichoMatrix(100, model = "3PL") m.3PL <- as.matrix(m.3PL) # Creation of a respo...
# Import data from ian's dug trial 20171020 and tidy / clean / export # # Ian Handel # library(tidyverse) library(stringr) library(forcats) library(readxl) library(knitr) dat <- read_excel("data/ih-trial_results_20171020.xlsx", sheet = 1) %>% fill(sex, age, treatment) %>% mutate(subject = ...
/code/tidy_ih-trial_20171020.R
no_license
jillymackay/why_R
R
false
false
2,118
r
# Import data from ian's dug trial 20171020 and tidy / clean / export # # Ian Handel # library(tidyverse) library(stringr) library(forcats) library(readxl) library(knitr) dat <- read_excel("data/ih-trial_results_20171020.xlsx", sheet = 1) %>% fill(sex, age, treatment) %>% mutate(subject = ...
rm(list=ls()) #========================== # I DATI DELLE AUTOMOBILI #========================== # import auto <- read.table("http://azzalini.stat.unipd.it/Book-DM/auto.dat", header=TRUE, quote="\"") # dimensione dim(auto) # ci sono dati mancanti? sum(is.na(auto)) # tipologia di variabili str(auto) # ricodifica va...
/docs/RCODE/Auto.R
no_license
aldosolari/DM
R
false
false
4,029
r
rm(list=ls()) #========================== # I DATI DELLE AUTOMOBILI #========================== # import auto <- read.table("http://azzalini.stat.unipd.it/Book-DM/auto.dat", header=TRUE, quote="\"") # dimensione dim(auto) # ci sono dati mancanti? sum(is.na(auto)) # tipologia di variabili str(auto) # ricodifica va...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/r4health.tutorials.R \docType{package} \name{r4health.tutorials} \alias{r4health.tutorials} \alias{r4health.tutorials-package} \title{r4health.tutorials} \description{ This package simply provides tutorials for learning R. It has dependencies...
/man/r4health.tutorials.Rd
no_license
TysonStanley/r4health.tutorials
R
false
true
517
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/r4health.tutorials.R \docType{package} \name{r4health.tutorials} \alias{r4health.tutorials} \alias{r4health.tutorials-package} \title{r4health.tutorials} \description{ This package simply provides tutorials for learning R. It has dependencies...
#dependency require(maps) #load data load("../Data/GPDDFiltered.RData") #worldview using maps map(database = "world", fill = TRUE, col = "grey", bg = "white", border = "black",) #load world map points(x = gpdd$long, y = gpdd$lat, col = "orange", pch = 16, cex = 0.7) #superimpose points #western vi...
/Week3/Code/GPDD_Data.R
no_license
amishabhojwani/CMEECourseWork
R
false
false
893
r
#dependency require(maps) #load data load("../Data/GPDDFiltered.RData") #worldview using maps map(database = "world", fill = TRUE, col = "grey", bg = "white", border = "black",) #load world map points(x = gpdd$long, y = gpdd$lat, col = "orange", pch = 16, cex = 0.7) #superimpose points #western vi...
## Coursera - Data Science ## R Programming Week 2 ## Assignment 1 ## Callum Grimmer 2017 pollutantmean <- function(directory, pollutant, id = 1:332){ sum <- 0 numValues <- 0 for(i in id){ tempid <- i if(tempid < 10){ tempid <- paste("00",tempid,sep="") } else if(te...
/R Programming/pollutantMean.R
no_license
CallumGrimmer/datasciencecoursera
R
false
false
670
r
## Coursera - Data Science ## R Programming Week 2 ## Assignment 1 ## Callum Grimmer 2017 pollutantmean <- function(directory, pollutant, id = 1:332){ sum <- 0 numValues <- 0 for(i in id){ tempid <- i if(tempid < 10){ tempid <- paste("00",tempid,sep="") } else if(te...
vec2norm <- function(x, contains_w, length_w, linearity_w, dist_w, sat_w, light_w) { check_package("recipes") check_package("tidyselect") recipes::recipe(name ~ ., data = x) %>% recipes::step_normalize(recipes::all_predictors()) %>% recipes::step_mutate_at(tidyselect::starts_with("con...
/R/nn_palettes.R
permissive
EmilHvitfeldt/palette2vec
R
false
false
3,857
r
vec2norm <- function(x, contains_w, length_w, linearity_w, dist_w, sat_w, light_w) { check_package("recipes") check_package("tidyselect") recipes::recipe(name ~ ., data = x) %>% recipes::step_normalize(recipes::all_predictors()) %>% recipes::step_mutate_at(tidyselect::starts_with("con...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recode_node_attrs.R \name{recode_node_attrs} \alias{recode_node_attrs} \title{Recode a set of node attribute values} \usage{ recode_node_attrs( graph, node_attr_from, ..., otherwise = NULL, node_attr_to = NULL ) } \arguments{ \item{...
/man/recode_node_attrs.Rd
permissive
nograpes/DiagrammeR
R
false
true
2,390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recode_node_attrs.R \name{recode_node_attrs} \alias{recode_node_attrs} \title{Recode a set of node attribute values} \usage{ recode_node_attrs( graph, node_attr_from, ..., otherwise = NULL, node_attr_to = NULL ) } \arguments{ \item{...
library(data.table) library(compiler) library(Rcpp) library(RcppArmadillo) library(stringr) output_cooccurrences <- function(processed_tokens, folderpath, group_id, window_length) { set_sepstring(occurrences_sepstr) invisible(lapply(processed_tokens, function(element) { fasterCooccurrences(element$content, 4) ...
/chetan_mishra_sandbox/semantic range modeling/cooccurrences pipeline.R
no_license
cmishra/dsicapstone-predicting_extremism
R
false
false
547
r
library(data.table) library(compiler) library(Rcpp) library(RcppArmadillo) library(stringr) output_cooccurrences <- function(processed_tokens, folderpath, group_id, window_length) { set_sepstring(occurrences_sepstr) invisible(lapply(processed_tokens, function(element) { fasterCooccurrences(element$content, 4) ...
# Rstudio environment ----------------------------------------------------- Rstudio != R # R as a calculator ------------------------------------------------------- 3 + 4 7 * 5 6 ^ 3 # assignment -------------------------------------------------------------- All R statements where you create objects -- "assignm...
/R/intro_to_R.R
no_license
SOS598-RDM/rdm-lecture-R
R
false
false
2,495
r
# Rstudio environment ----------------------------------------------------- Rstudio != R # R as a calculator ------------------------------------------------------- 3 + 4 7 * 5 6 ^ 3 # assignment -------------------------------------------------------------- All R statements where you create objects -- "assignm...
#'@title Two-column coordinates(X,Y) extracted from published Kaplan Meier curves by ScanIt software #'@description The dataset is extracted from a published Kaplan Meier image by ScanIt software. Locoreginal control events #' were studied in 424 head and neck cancer patients: 213 in Radiotherapy treatment group and 21...
/R/Radiationdata.R
no_license
NaLiuStat/IPDfromKM
R
false
false
2,563
r
#'@title Two-column coordinates(X,Y) extracted from published Kaplan Meier curves by ScanIt software #'@description The dataset is extracted from a published Kaplan Meier image by ScanIt software. Locoreginal control events #' were studied in 424 head and neck cancer patients: 213 in Radiotherapy treatment group and 21...
drupal_plots <- function(data.df, start.date, end.date, min.flow, max.flow = NA, gages.checked, labels.vec = NULL, linesize.vec = NULL, linetype.vec = NULL, color.vec = NULL, x.class, ...
/global/drupal_plot_func.R
no_license
InterstateCommissionPotomacRiverBasin/pull_flow
R
false
false
4,750
r
drupal_plots <- function(data.df, start.date, end.date, min.flow, max.flow = NA, gages.checked, labels.vec = NULL, linesize.vec = NULL, linetype.vec = NULL, color.vec = NULL, x.class, ...
# # This test file has been generated by kwb.test::create_test_files() # test_that("hsPdfDev() works", { kwb.base:::hsPdfDev() })
/tests/testthat/test-function-hsPdfDev.R
permissive
KWB-R/kwb.base
R
false
false
146
r
# # This test file has been generated by kwb.test::create_test_files() # test_that("hsPdfDev() works", { kwb.base:::hsPdfDev() })
######selenium in bugs selection##### install.packages("compare") library(compare) library(tidyr) library(dplyr) se_bugs1516_2<-merge(se_bugs1516b,sites_only) write.csv(se_bugs1516,"se_bugs1516.csv") write.csv(se_bugs1516_2,"se_bugs1516_2.csv") se_bugs1516_2$min_area m4b<-brm(se_ugg~taxon*stage*trt+(1|...
/script_model_selection.R
no_license
briannahenry/PPR_Agriculture
R
false
false
2,549
r
######selenium in bugs selection##### install.packages("compare") library(compare) library(tidyr) library(dplyr) se_bugs1516_2<-merge(se_bugs1516b,sites_only) write.csv(se_bugs1516,"se_bugs1516.csv") write.csv(se_bugs1516_2,"se_bugs1516_2.csv") se_bugs1516_2$min_area m4b<-brm(se_ugg~taxon*stage*trt+(1|...
# Compare the number of protein-protein interactions (PPIs) and the size of the # largest connected component (LCC) formed by LC genes in human interactomes. setwd("~/git/spinal-cord-injury-elife-2018") options(stringsAsFactors = F) library(tidyverse) library(magrittr) library(igraph) # read LC genes dat = read.delim(...
/R/PPI/analyze-PPI-LCC.R
permissive
skinnider/spinal-cord-injury-elife-2018
R
false
false
2,527
r
# Compare the number of protein-protein interactions (PPIs) and the size of the # largest connected component (LCC) formed by LC genes in human interactomes. setwd("~/git/spinal-cord-injury-elife-2018") options(stringsAsFactors = F) library(tidyverse) library(magrittr) library(igraph) # read LC genes dat = read.delim(...
#' @title #' Classify inventory data based on site index #' @description #' Use the site variable to classify a forest management data. #' #' @param df A data frame. #' @param site Quoted name for the site variable. #' @param nc number of categories used to classify the data. If \code{3}, a additional column will be...
/R/classify_site.R
permissive
Dawa406/forestmangr
R
false
false
7,921
r
#' @title #' Classify inventory data based on site index #' @description #' Use the site variable to classify a forest management data. #' #' @param df A data frame. #' @param site Quoted name for the site variable. #' @param nc number of categories used to classify the data. If \code{3}, a additional column will be...
/Chapter6.R
no_license
maydaisyoung/Rstudy.ISLR
R
false
false
5,006
r
#' Get symbols #' @description This function scraps the symbols from the public API of a host of exchanges #' @param exchange Name of an exchange (e.g. "binance", "kraken", "lykke") #' @return Character vector with symbols tradeable on specific exchange #' @export #' @importFrom jsonlite fromJSON get_symbols <- functi...
/R/get_symbols.R
permissive
voigtstefan/CryptoX
R
false
false
4,955
r
#' Get symbols #' @description This function scraps the symbols from the public API of a host of exchanges #' @param exchange Name of an exchange (e.g. "binance", "kraken", "lykke") #' @return Character vector with symbols tradeable on specific exchange #' @export #' @importFrom jsonlite fromJSON get_symbols <- functi...
library(sqldf) library(lubridate) library(chron) ##Create a working directory if it does not already exist if (!file.exists("workingDir")){ dir.create("workingDir") } setwd("workingDir") ##Downloading the Electric Power Consumption dataset url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_p...
/plot4.R
no_license
EParc/ExData_Plotting1
R
false
false
2,454
r
library(sqldf) library(lubridate) library(chron) ##Create a working directory if it does not already exist if (!file.exists("workingDir")){ dir.create("workingDir") } setwd("workingDir") ##Downloading the Electric Power Consumption dataset url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_p...
# s.NLA.R # ::rtemis:: # 2018 Efstathios D. Gennatas egenn.github.io #' NonLinear Activation unit Regression (NLA) [R] #' #' Train an equivalent of a 1 hidden unit neural network with a defined nonlinear activation function #' using `optim` #' #' Since we are using `optim`, results will be sensitive to the combination...
/R/s.NLA.R
no_license
muschellij2/rtemis
R
false
false
5,444
r
# s.NLA.R # ::rtemis:: # 2018 Efstathios D. Gennatas egenn.github.io #' NonLinear Activation unit Regression (NLA) [R] #' #' Train an equivalent of a 1 hidden unit neural network with a defined nonlinear activation function #' using `optim` #' #' Since we are using `optim`, results will be sensitive to the combination...
makeCacheMatrix <- function(x = matrix(), nr, nc, br) { ## PARAMETERS: x (matrix object), nr (number of rows), nc (num of columns) ##, br (byrow TRUE or FALSE) ## OUTPUT: Creates an R object that contains the inverse of the matrix and ## the row and column sum vectors to determine if the matrix has changed #...
/cachematrix.R
no_license
lvillalt/ProgrammingAssignment2
R
false
false
4,635
r
makeCacheMatrix <- function(x = matrix(), nr, nc, br) { ## PARAMETERS: x (matrix object), nr (number of rows), nc (num of columns) ##, br (byrow TRUE or FALSE) ## OUTPUT: Creates an R object that contains the inverse of the matrix and ## the row and column sum vectors to determine if the matrix has changed #...
g# Setup bibliotecas = (c("shiny","ggplot2","readxl","mc2d","dplyr","devtools")) setup_oshcba = function () { # Instalar Bibliotecas do Cran carregar_bibliotecas_cran(bibliotecas) instalar_oshcba() } instalar_oshcba = function () { library(devtools) install_github("pedroliman/oshcba") } carregar_biblioteca...
/setup.R
permissive
pedroliman/oshcbaapp
R
false
false
704
r
g# Setup bibliotecas = (c("shiny","ggplot2","readxl","mc2d","dplyr","devtools")) setup_oshcba = function () { # Instalar Bibliotecas do Cran carregar_bibliotecas_cran(bibliotecas) instalar_oshcba() } instalar_oshcba = function () { library(devtools) install_github("pedroliman/oshcba") } carregar_biblioteca...
/MLib/signal.r
no_license
markusMiksa/ETFportfolio
R
false
false
109,821
r
## Plot2 ## Reading the Data url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url, destfile = "data.zip", method = "curl") file <- unzip("data.zip", unzip = "internal") ## Installing packages install.packages("data.table") library(data.table) ## ...
/Plot2.R
no_license
jepg24/ExData_Plotting1
R
false
false
778
r
## Plot2 ## Reading the Data url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url, destfile = "data.zip", method = "curl") file <- unzip("data.zip", unzip = "internal") ## Installing packages install.packages("data.table") library(data.table) ## ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/F0028.R \name{findMarkers} \alias{findMarkers} \title{Find marker genes for each cluster} \usage{ findMarkers( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", fold.change = 2, padjval = 0.1, Inf...
/man/findMarkers.Rd
no_license
cran/iCellR
R
false
true
1,470
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/F0028.R \name{findMarkers} \alias{findMarkers} \title{Find marker genes for each cluster} \usage{ findMarkers( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", fold.change = 2, padjval = 0.1, Inf...
library(MCMCpack) ### Name: MCMCoprobit ### Title: Markov Chain Monte Carlo for Ordered Probit Regression ### Aliases: MCMCoprobit ### Keywords: models ### ** Examples ## Not run: ##D x1 <- rnorm(100); x2 <- rnorm(100); ##D z <- 1.0 + x1*0.1 - x2*0.5 + rnorm(100); ##D y <- z; y[z < 0] <- 0; y[z >= 0 &...
/data/genthat_extracted_code/MCMCpack/examples/MCMCoprobit.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
630
r
library(MCMCpack) ### Name: MCMCoprobit ### Title: Markov Chain Monte Carlo for Ordered Probit Regression ### Aliases: MCMCoprobit ### Keywords: models ### ** Examples ## Not run: ##D x1 <- rnorm(100); x2 <- rnorm(100); ##D z <- 1.0 + x1*0.1 - x2*0.5 + rnorm(100); ##D y <- z; y[z < 0] <- 0; y[z >= 0 &...
# 데이터 전처리 - dplyr 패키지를 학습하자.... # dplyr : 데이터프레임(티블)을 다루는 유용한 기능의 함수들 제공 install.packages("dplyr") library(dplyr) #install.packages("ggplot2") rm(mpg) library(ggplot2) head(mpg) str(mpg) exam <- read.csv("data/csv_exam.csv") str(exam) dim(exam) head(exam);tail(exam) View(exam) # exam에서 class가 1인 경우만 추출하여 출력 exam %>%...
/day13.R
no_license
HaneulJ/R
R
false
false
8,221
r
# 데이터 전처리 - dplyr 패키지를 학습하자.... # dplyr : 데이터프레임(티블)을 다루는 유용한 기능의 함수들 제공 install.packages("dplyr") library(dplyr) #install.packages("ggplot2") rm(mpg) library(ggplot2) head(mpg) str(mpg) exam <- read.csv("data/csv_exam.csv") str(exam) dim(exam) head(exam);tail(exam) View(exam) # exam에서 class가 1인 경우만 추출하여 출력 exam %>%...
\name{HACClass} \alias{HACClass} \title{Internal R code} \description{\code{HACClass} comprises internal R code used to generate an object used by \code{HAC.simrep}. It is not directly called by the user. }
/fuzzedpackages/HACSim/man/HACClass.Rd
no_license
akhikolla/testpackages
R
false
false
210
rd
\name{HACClass} \alias{HACClass} \title{Internal R code} \description{\code{HACClass} comprises internal R code used to generate an object used by \code{HAC.simrep}. It is not directly called by the user. }
#' Seoul city's septic tank odor sensor data #' #' Data from 'data.seoul.go.kr' #' #' @docType data #' #' @usage data(sample) #' #' @keywords datasets #' #' @references http://data.seoul.go.kr/dataList/OA-15966/S/1/datasetView.do #' #' @examples #' data(sample)
/R/sample-data.R
no_license
cvb249/Odor_sensor
R
false
false
262
r
#' Seoul city's septic tank odor sensor data #' #' Data from 'data.seoul.go.kr' #' #' @docType data #' #' @usage data(sample) #' #' @keywords datasets #' #' @references http://data.seoul.go.kr/dataList/OA-15966/S/1/datasetView.do #' #' @examples #' data(sample)
#' Get tabular metadata #' #' This function takes a path to an EML (.xml) metadata file and returns a data frame. #' #' @param eml An emld class object, the path to an EML (.xml) metadata file, or a raw EML object #' @param full (logical) Returns the most commonly used metadata fields by default. #' If \code{full = TR...
/R/tabularize_eml.R
no_license
isteves/metajam
R
false
false
2,303
r
#' Get tabular metadata #' #' This function takes a path to an EML (.xml) metadata file and returns a data frame. #' #' @param eml An emld class object, the path to an EML (.xml) metadata file, or a raw EML object #' @param full (logical) Returns the most commonly used metadata fields by default. #' If \code{full = TR...
library(shiny) library(shinydashboard) library(DT) library(gridExtra) library(ggplot2) css <- "body > div > header > nav {margin-left:25% !important} body > div > header > span {width:25% !important} #DataTables_Table_0 > thead > tr > th:nth-child(1) { text-align:center;} .myClass { c...
/App/ui.R
no_license
KevorkSulahian/ECON_P
R
false
false
9,135
r
library(shiny) library(shinydashboard) library(DT) library(gridExtra) library(ggplot2) css <- "body > div > header > nav {margin-left:25% !important} body > div > header > span {width:25% !important} #DataTables_Table_0 > thead > tr > th:nth-child(1) { text-align:center;} .myClass { c...
> # Position for labels on x axis > DF_all$xtext <- DF_all$xmin + (DF_all$xmax - DF_all$xmin)/2 > > # Position for labels on y axis (don't change) > index <- DF_all$xmax == max(DF_all$xmax) > DF_all$ytext <- DF_all$ymin[index] + (DF_all$ymax[index] - DF_all$ymin[index])/2 > > # Plot > ggplot(DF_all, aes(ymin = ymin, ...
/CHIS.R
no_license
madeleinedhazen/chitown
R
false
false
947
r
> # Position for labels on x axis > DF_all$xtext <- DF_all$xmin + (DF_all$xmax - DF_all$xmin)/2 > > # Position for labels on y axis (don't change) > index <- DF_all$xmax == max(DF_all$xmax) > DF_all$ytext <- DF_all$ymin[index] + (DF_all$ymax[index] - DF_all$ymin[index])/2 > > # Plot > ggplot(DF_all, aes(ymin = ymin, ...
library(biomod2) library(raster) library(ggplot2) cc85bi70_bio1 = raster("cc85bi70/cc85bi70/bio_1.tif") bio1 = crop(cc85bi70_bio1, extent(-12,41.9,34.6,71.4)) cc85bi70_bio2 = raster("cc85bi70/cc85bi70/bio_2.tif") bio2 = crop(cc85bi70_bio2, extent(-12,41.9,34.6,71.4)) cc85bi70_bio3 = raster("cc85bi70/cc85bi70/bio_3....
/cc85bi70.R
no_license
yfmolinahenao/RI_Temperature
R
false
false
5,051
r
library(biomod2) library(raster) library(ggplot2) cc85bi70_bio1 = raster("cc85bi70/cc85bi70/bio_1.tif") bio1 = crop(cc85bi70_bio1, extent(-12,41.9,34.6,71.4)) cc85bi70_bio2 = raster("cc85bi70/cc85bi70/bio_2.tif") bio2 = crop(cc85bi70_bio2, extent(-12,41.9,34.6,71.4)) cc85bi70_bio3 = raster("cc85bi70/cc85bi70/bio_3....
# Install and import R-packages # install.packages("rgdal") # install.packages("RColorBrewer") # install.packages("surveillance") library("rgdal")# library("RColorBrewer")# library("surveillance")# ####Load shape file #dowload manually from this website https://github.com/Joachimmarien/COVID19-DRC/blob/mas...
/COVID DRC provinces.R
no_license
Joachimmarien/COVID19-DRC
R
false
false
2,280
r
# Install and import R-packages # install.packages("rgdal") # install.packages("RColorBrewer") # install.packages("surveillance") library("rgdal")# library("RColorBrewer")# library("surveillance")# ####Load shape file #dowload manually from this website https://github.com/Joachimmarien/COVID19-DRC/blob/mas...
library(lubridate) #read in the original file dat <- read.table("household_power_consumption.txt",sep=";",skip=1) #select the data corresponding to the 2 days in Feb subdat <- dat[dat[,1]=='1/2/2007'|dat[,1]=='2/2/2007',] #extract and combine date and time from the selected subset datetime <- dmy(subdat[,1])+hms(su...
/plot4.R
no_license
datanov123/ExData_Plotting1
R
false
false
1,727
r
library(lubridate) #read in the original file dat <- read.table("household_power_consumption.txt",sep=";",skip=1) #select the data corresponding to the 2 days in Feb subdat <- dat[dat[,1]=='1/2/2007'|dat[,1]=='2/2/2007',] #extract and combine date and time from the selected subset datetime <- dmy(subdat[,1])+hms(su...
source("R/AdaptiveThresholding/cormad.R") source("R/AdaptiveThresholding/bin_matrix.R") source("R/AdaptiveThresholding/thresholding.R") source("R/AdaptiveThresholding/compute_statistics.R") source("R/AdaptiveThresholding/correlations_cv.R") library(parallel) library(foreach) library(doMC) library(grndata) data = syn...
/test_synthetic_network.R
no_license
pietro-coretto/RobustSparseCorrelation
R
false
false
2,026
r
source("R/AdaptiveThresholding/cormad.R") source("R/AdaptiveThresholding/bin_matrix.R") source("R/AdaptiveThresholding/thresholding.R") source("R/AdaptiveThresholding/compute_statistics.R") source("R/AdaptiveThresholding/correlations_cv.R") library(parallel) library(foreach) library(doMC) library(grndata) data = syn...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ghcn-base-sql-qry-utils.R \name{wrap_gen_query_ghcn_base_sfeat} \alias{wrap_gen_query_ghcn_base_sfeat} \title{Wrapper function to generate a single combined or separate \code{SQL} files for individual feature NOAA SWDI lagged aggregated time ...
/man/wrap_gen_query_ghcn_base_sfeat.Rd
permissive
shamindras/backburner
R
false
true
2,483
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ghcn-base-sql-qry-utils.R \name{wrap_gen_query_ghcn_base_sfeat} \alias{wrap_gen_query_ghcn_base_sfeat} \title{Wrapper function to generate a single combined or separate \code{SQL} files for individual feature NOAA SWDI lagged aggregated time ...
library("ggplot2") critical <- function(x){ wynik=0 if(x<(-1.96) || x>1.96){ wynik=1 } return(wynik) } MocNormil <- function(delta){ n = 100 symNum = 500 Xe=matrix(rnorm(n*symNum),ncol=symNum) Ye=matrix(rnorm(n*symNum)+delta,ncol=symNum) Xme=apply(Xe,2,mean) Yme=apply(Ye,2,mean) Ze=abs(Xme-Y...
/Lista1/zad4.R
no_license
majsylw/statistical-methods-in-biology
R
false
false
2,273
r
library("ggplot2") critical <- function(x){ wynik=0 if(x<(-1.96) || x>1.96){ wynik=1 } return(wynik) } MocNormil <- function(delta){ n = 100 symNum = 500 Xe=matrix(rnorm(n*symNum),ncol=symNum) Ye=matrix(rnorm(n*symNum)+delta,ncol=symNum) Xme=apply(Xe,2,mean) Yme=apply(Ye,2,mean) Ze=abs(Xme-Y...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SpatialWeights.R \name{bartlettSparse} \alias{bartlettSparse} \title{Weighting Kernel} \usage{ bartlettSparse(d, dmax) } \arguments{ \item{d}{distance vector} \item{dmax}{maximumm distance} } \value{ vector of bartlett weights } \description...
/STrollR/man/bartlettSparse.Rd
permissive
Jadamso/STrollR
R
false
true
341
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SpatialWeights.R \name{bartlettSparse} \alias{bartlettSparse} \title{Weighting Kernel} \usage{ bartlettSparse(d, dmax) } \arguments{ \item{d}{distance vector} \item{dmax}{maximumm distance} } \value{ vector of bartlett weights } \description...
\name{gtableSetProperties} \alias{gtableSetProperties} \title{gtableSetProperties API wrapper} \usage{ gtableSetProperties(objectID, inputParams = emptyNamedList, jsonifyData = TRUE, alwaysRetry = TRUE) } \arguments{ \item{objectID}{DNAnexus object ID} \item{inputParams}{Either an R object that will be ...
/src/R/dxR/man/gtableSetProperties.Rd
permissive
jameslz/dx-toolkit
R
false
false
1,223
rd
\name{gtableSetProperties} \alias{gtableSetProperties} \title{gtableSetProperties API wrapper} \usage{ gtableSetProperties(objectID, inputParams = emptyNamedList, jsonifyData = TRUE, alwaysRetry = TRUE) } \arguments{ \item{objectID}{DNAnexus object ID} \item{inputParams}{Either an R object that will be ...
#server.R script for shinyhangout_example application #Calls reactive input from ui.R to simulate a concentration-time profile and plots the resulting profile #---------------------------------------------------------------------------------- #Non-reactive objects/expressions, i.e., do not depend on reactive widget inp...
/previous_shiny_material/Shiny Hangout/shiny_example_final/server.R
no_license
jhhughes256/shiny-paganz
R
false
false
2,949
r
#server.R script for shinyhangout_example application #Calls reactive input from ui.R to simulate a concentration-time profile and plots the resulting profile #---------------------------------------------------------------------------------- #Non-reactive objects/expressions, i.e., do not depend on reactive widget inp...
# GraphHopper Directions API # # You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window...
/r/R/CostMatrixData.r
no_license
ajisantoso/directions-api-clients
R
false
false
3,747
r
# GraphHopper Directions API # # You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window...
## Storr support for crate ## ## The issue with getting this to work well is that we really want the ## "eventually consistent" thing to work for us. So it'd be nice to ## be allow the storr to sync, unsync separately. storr_crate <- function(crate, tbl_data, tbl_keys, default_namespace = "obj...
/R/storr.R
no_license
richfitz/crater
R
false
false
5,469
r
## Storr support for crate ## ## The issue with getting this to work well is that we really want the ## "eventually consistent" thing to work for us. So it'd be nice to ## be allow the storr to sync, unsync separately. storr_crate <- function(crate, tbl_data, tbl_keys, default_namespace = "obj...
# This script uses filtered duplication data obtained from filtration for cnv analyses # Dependencies installation and loading for (i in c("tidyverse","here")) { if(!require(i, character.only=TRUE)) { install.packages(i, dependencies=TRUE) require(i, character.only=TRUE) } } #### Copy Number comparison of...
/characterization/cnv_analyses.R
no_license
tejashree1modak/Cvir-cnv
R
false
false
11,755
r
# This script uses filtered duplication data obtained from filtration for cnv analyses # Dependencies installation and loading for (i in c("tidyverse","here")) { if(!require(i, character.only=TRUE)) { install.packages(i, dependencies=TRUE) require(i, character.only=TRUE) } } #### Copy Number comparison of...
library(mclust) library(readxl) gmm <- Mclust(Iris_CursorTargets_Dist,G=3) summary(gmm) plot(gmm,what="classification") #mod1<- densityMclust(Iris_CursorTargets_Dist) #summary(mod1) #plot(mod1,what="BIC") ##### Global Initialization ###### vector1 <- c(5, 4, 3, 2, 1) amp <- array(c(vector1),dim = c(1,5,1)) p...
/GMM_MultiTargets1.R
no_license
sanjaylopa22/EEG-Signal-Analaysis-and-Classification-in-R
R
false
false
3,992
r
library(mclust) library(readxl) gmm <- Mclust(Iris_CursorTargets_Dist,G=3) summary(gmm) plot(gmm,what="classification") #mod1<- densityMclust(Iris_CursorTargets_Dist) #summary(mod1) #plot(mod1,what="BIC") ##### Global Initialization ###### vector1 <- c(5, 4, 3, 2, 1) amp <- array(c(vector1),dim = c(1,5,1)) p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parallel_gergm.R \name{parallel_gergm} \alias{parallel_gergm} \title{A Function to estimate a number of GERGMs in parallel, each with its own equation.} \usage{ parallel_gergm(formula_list, observed_network_list, covariate_data_list = NULL,...
/man/parallel_gergm.Rd
no_license
paulstillman/GERGM
R
false
true
15,019
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parallel_gergm.R \name{parallel_gergm} \alias{parallel_gergm} \title{A Function to estimate a number of GERGMs in parallel, each with its own equation.} \usage{ parallel_gergm(formula_list, observed_network_list, covariate_data_list = NULL,...
#' @title The shiny app to lists all columns for a Google Analytics given report type #' #' @param report.type character. Report type. Allowed Values: ga. Where ga corresponds to the Core Reporting API. #' #' @references #' \href{https://developers.google.com/analytics/devguides/reporting/core/dimsmets}{Dimensions & Me...
/R/shiny.R
no_license
Timmwardion/RDFA
R
false
false
3,357
r
#' @title The shiny app to lists all columns for a Google Analytics given report type #' #' @param report.type character. Report type. Allowed Values: ga. Where ga corresponds to the Core Reporting API. #' #' @references #' \href{https://developers.google.com/analytics/devguides/reporting/core/dimsmets}{Dimensions & Me...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tracker.R \name{print.tracker} \alias{print.tracker} \title{Title} \usage{ \method{print}{tracker}() } \description{ Title }
/man/print.tracker.Rd
no_license
TylerGrantSmith/heimdallr
R
false
true
203
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tracker.R \name{print.tracker} \alias{print.tracker} \title{Title} \usage{ \method{print}{tracker}() } \description{ Title }
load("rmse_results.Rdata") params <- out[,c("g", "r", "n")] mse <- out[,setdiff(names(out), c("g", "r", "n"))] rmse <- sqrt(mse) cbind(params, round(rmse, 2)) cbind(params, diff = with(rmse, round(Full - Valid, 2))) cbind(params, FMSC = with(rmse, round(FMSC, 2))) cbind(params, diff = with(rmse, round(FMSC - Valid, 2)...
/SimulationChooseIVs/test/compare_rmse_to_prev.R
no_license
fditraglia/fmsc
R
false
false
470
r
load("rmse_results.Rdata") params <- out[,c("g", "r", "n")] mse <- out[,setdiff(names(out), c("g", "r", "n"))] rmse <- sqrt(mse) cbind(params, round(rmse, 2)) cbind(params, diff = with(rmse, round(Full - Valid, 2))) cbind(params, FMSC = with(rmse, round(FMSC, 2))) cbind(params, diff = with(rmse, round(FMSC - Valid, 2)...
suppressMessages({ library(faosws) library(faoswsUtil) library(data.table) library(magrittr) }) ## Setting up variables reportingCountryVar = "reportingCountryM49" partnerCountryVar = "partnerCountryM49" yearVar = "timePointYears" itemVar = "measuredItemHS" elementVar = "measuredElementTrade" valu...
/tests/get_trade_data.R
no_license
vannem/sws_trade
R
false
false
22,986
r
suppressMessages({ library(faosws) library(faoswsUtil) library(data.table) library(magrittr) }) ## Setting up variables reportingCountryVar = "reportingCountryM49" partnerCountryVar = "partnerCountryM49" yearVar = "timePointYears" itemVar = "measuredItemHS" elementVar = "measuredElementTrade" valu...
# ---- init ---- rm(list=ls()) source("config.R") source("stats.R") # source("similarities.R") source("logic-based.R") source("mcn-test.R") source("utils.R") library(parallel) library(reshape2) library(dplyr) library(Matrix) library(igraph) library(RCurl) EVALUATION.OUTPUT.FILE = 'dyslexic-eval-output.RData' EVALU...
/eval-keel-dyslexic.R
permissive
bikol/uncertain-classification
R
false
false
6,378
r
# ---- init ---- rm(list=ls()) source("config.R") source("stats.R") # source("similarities.R") source("logic-based.R") source("mcn-test.R") source("utils.R") library(parallel) library(reshape2) library(dplyr) library(Matrix) library(igraph) library(RCurl) EVALUATION.OUTPUT.FILE = 'dyslexic-eval-output.RData' EVALU...
library(abd) ### Name: WrasseSexes ### Title: Distribution of Wrasses ### Aliases: WrasseSexes ### Keywords: datasets ### ** Examples xtabs(count ~ males + females, WrasseSexes)
/data/genthat_extracted_code/abd/examples/WrasseSexes.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
185
r
library(abd) ### Name: WrasseSexes ### Title: Distribution of Wrasses ### Aliases: WrasseSexes ### Keywords: datasets ### ** Examples xtabs(count ~ males + females, WrasseSexes)
library(data.table) ## Download and unzip the source data if(!file.exists("data")){dir.create("data")} fileurl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileurl,destfile = "data/source.zip",mode="wb") unzip("data/source.zip",exdir = "data") source_file = "d...
/plot2.R
no_license
praravic/ExData_Plotting1
R
false
false
996
r
library(data.table) ## Download and unzip the source data if(!file.exists("data")){dir.create("data")} fileurl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileurl,destfile = "data/source.zip",mode="wb") unzip("data/source.zip",exdir = "data") source_file = "d...
\name{h5createDataset} \alias{h5createDataset} %- Also NEED an '\alias' for EACH other topic documented here. \title{Create HDF5 dataset} \description{R function to create an HDF5 dataset and defining its dimensionality and compression behaviour. } \usage{ h5createDataset (file, dataset, dims, maxdims = dims, sto...
/man/h5createDataset.Rd
no_license
patperry/rhdf5
R
false
false
3,489
rd
\name{h5createDataset} \alias{h5createDataset} %- Also NEED an '\alias' for EACH other topic documented here. \title{Create HDF5 dataset} \description{R function to create an HDF5 dataset and defining its dimensionality and compression behaviour. } \usage{ h5createDataset (file, dataset, dims, maxdims = dims, sto...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute-sample-size.R \name{computeSampleSize} \alias{computeSampleSize} \title{Compute the Sample Size for a SMART.} \usage{ computeSampleSize(V, Delta, min_Delta, alpha = 0.05, desired_power) } \arguments{ \item{V}{The covariance m...
/man/computeSampleSize.Rd
no_license
cran/smartsizer
R
false
true
2,003
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute-sample-size.R \name{computeSampleSize} \alias{computeSampleSize} \title{Compute the Sample Size for a SMART.} \usage{ computeSampleSize(V, Delta, min_Delta, alpha = 0.05, desired_power) } \arguments{ \item{V}{The covariance m...
plot(unlist(debug.variables$avg.acc.rate), type = "l") plot(unlist(debug.variables$avg.acc.rate)) plot(unlist(results$effective.sample.sizes), type = "l") plot(unlist(debug.variables$empirical.variance), type = "l") plot(unlist(results$all.particles[length(results$all.particles)]), pch = 16) plot(unlist(debug.varia...
/src/smc/smcDebugging.R
no_license
torebre/abcR
R
false
false
2,325
r
plot(unlist(debug.variables$avg.acc.rate), type = "l") plot(unlist(debug.variables$avg.acc.rate)) plot(unlist(results$effective.sample.sizes), type = "l") plot(unlist(debug.variables$empirical.variance), type = "l") plot(unlist(results$all.particles[length(results$all.particles)]), pch = 16) plot(unlist(debug.varia...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv = NULL set = function(y){ x <<- y inv <<- NULL } get = function() x setinv = function(inverse) inv <<- inverse getinv...
/cachematrix.R
no_license
evelynwang/ProgrammingAssignment2
R
false
false
923
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv = NULL set = function(y){ x <<- y inv <<- NULL } get = function() x setinv = function(inverse) inv <<- inverse getinv...
### R code from vignette source 'manual_de.Rnw' ### Encoding: UTF-8
/data/genthat_extracted_code/GrapheR/vignettes/manual_de.R
no_license
surayaaramli/typeRrh
R
false
false
69
r
### R code from vignette source 'manual_de.Rnw' ### Encoding: UTF-8
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BinarySearch.R \name{BinarySearch} \alias{BinarySearch} \title{Internal function which does not have to be used by the users} \usage{ BinarySearch(argu, sumabs) } \description{ Internal function which does not have to be used by the ...
/man/BinarySearch.Rd
no_license
raydai/RGCCA
R
false
true
380
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BinarySearch.R \name{BinarySearch} \alias{BinarySearch} \title{Internal function which does not have to be used by the users} \usage{ BinarySearch(argu, sumabs) } \description{ Internal function which does not have to be used by the ...
## Selector of for levels of document types and themes # Attach or download and attach tidyverse if ("tidyverse" %in% installed.packages()[, 1]) { library(tidyverse) } else { install.packages("tidyverse") library(tidyverse) } # Load dataframes main <- read_tsv("/home/user/Comp_app/data/funds_df_5.csv") periodic...
/theme_selector.R
no_license
Volodin-DD/prep_scripts_nekr_app
R
false
false
6,367
r
## Selector of for levels of document types and themes # Attach or download and attach tidyverse if ("tidyverse" %in% installed.packages()[, 1]) { library(tidyverse) } else { install.packages("tidyverse") library(tidyverse) } # Load dataframes main <- read_tsv("/home/user/Comp_app/data/funds_df_5.csv") periodic...
## package import library(shiny) library(shinydashboard) library(ggplot2) library(stringr) library(leaflet) library(dplyr) library(plotly) library(gridExtra) library(data.table) library(tm) library(wordcloud) library(memoise) library(ggwordcloud) library(SnowballC) library(rquery) library(imager) source('http://www.st...
/app/global.R
no_license
hellotherecsy/way_to_google
R
false
false
985
r
## package import library(shiny) library(shinydashboard) library(ggplot2) library(stringr) library(leaflet) library(dplyr) library(plotly) library(gridExtra) library(data.table) library(tm) library(wordcloud) library(memoise) library(ggwordcloud) library(SnowballC) library(rquery) library(imager) source('http://www.st...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/miscellaneous.R \name{weights2list} \alias{weights2list} \title{weights2list function} \usage{ weights2list(weights, dims) } \arguments{ \item{weights}{a vector of weights} \item{dims}{the dimensions of the network as stored from a call to t...
/man/weights2list.Rd
no_license
cran/deepNN
R
false
true
1,479
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/miscellaneous.R \name{weights2list} \alias{weights2list} \title{weights2list function} \usage{ weights2list(weights, dims) } \arguments{ \item{weights}{a vector of weights} \item{dims}{the dimensions of the network as stored from a call to t...
#' Set default R #' #' Function to insert line to initialize default packages automatically when R starts. #' #' @param pkgs character vector of package names to start with R #' #' @importFrom stringr str_c #' @importFrom utils installed.packages #' #' @export set_default_pkgs <- function(pkgs = NULL){ # Keep the cur...
/R/development/set_default_pkgs.R
no_license
bfatemi/spawnr
R
false
false
1,798
r
#' Set default R #' #' Function to insert line to initialize default packages automatically when R starts. #' #' @param pkgs character vector of package names to start with R #' #' @importFrom stringr str_c #' @importFrom utils installed.packages #' #' @export set_default_pkgs <- function(pkgs = NULL){ # Keep the cur...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include panorama_service.R NULL #' Creates an application instance and deploys it to a device #' #' @description #' Creates an application instance and deploys it to a device...
/cran/paws.machine.learning/R/panorama_operations.R
permissive
paws-r/paws
R
false
false
43,533
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include panorama_service.R NULL #' Creates an application instance and deploys it to a device #' #' @description #' Creates an application instance and deploys it to a device...
#San Francisco State University #ECON 312 #HOMEWORK 5 #Name of collaborators: Minjin Park and Nishanlang Khonglah rm(list=ls()) #rm(list of objects) removes all objects from memory graphics.off() #Closign all previously open graphs #Question 1 #Loading data into R wage <- read.csv("http://online.sfsu.edu/mbar/ECON3...
/HW5.R
no_license
nishanlang/ECONOMETRICS-LEARNINGS-IN-R
R
false
false
4,710
r
#San Francisco State University #ECON 312 #HOMEWORK 5 #Name of collaborators: Minjin Park and Nishanlang Khonglah rm(list=ls()) #rm(list of objects) removes all objects from memory graphics.off() #Closign all previously open graphs #Question 1 #Loading data into R wage <- read.csv("http://online.sfsu.edu/mbar/ECON3...
#### Analyse within species allometric relationships and compare to those among species ### NEED A DATA DICTIONARY FOR FUTURE USERS
/analysis_within_spp_allometry.r
no_license
jdjgilbert/syrphid
R
false
false
136
r
#### Analyse within species allometric relationships and compare to those among species ### NEED A DATA DICTIONARY FOR FUTURE USERS
# Multiple plot function # # ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) # - cols: Number of columns in layout # - layout: A matrix specifying the layout. If present, 'cols' is ignored. # # If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), # then plot...
/MultiPlotFunction.R
no_license
aer45/MastersProject
R
false
false
3,263
r
# Multiple plot function # # ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) # - cols: Number of columns in layout # - layout: A matrix specifying the layout. If present, 'cols' is ignored. # # If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), # then plot...
setwd('C:/Users/piotr/Desktop/Uczenie maszynowe/Zadania/Zadanie 4') library(MASS) install.packages('caret') library(caret) install.packages('libcoin', dependencies = T) install.packages('C50', dependencies = T) library(C50) smartphones <- read.csv("smartphones.csv", sep = ';') head(smartphones) smartphones_tree <...
/Zadanie 4/Zadanie 4.R
no_license
prybka82-student/APU
R
false
false
576
r
setwd('C:/Users/piotr/Desktop/Uczenie maszynowe/Zadania/Zadanie 4') library(MASS) install.packages('caret') library(caret) install.packages('libcoin', dependencies = T) install.packages('C50', dependencies = T) library(C50) smartphones <- read.csv("smartphones.csv", sep = ';') head(smartphones) smartphones_tree <...
### Set working directory setwd(dir = "/volumes/pbio-burke/users/ijameel/inam_SELECTION_239/") library(ggplot2) library(PerformanceAnalytics) library(dplyr) library(ade4) ### read in individual data with information for heterotic groups/oil cont etc ind <- read.csv(file = "239_PCA.csv", header = TRUE) ### Read in yo...
/Scripts/PCA _fun_101818.R
no_license
inam-jameel/Selection-239
R
false
false
1,964
r
### Set working directory setwd(dir = "/volumes/pbio-burke/users/ijameel/inam_SELECTION_239/") library(ggplot2) library(PerformanceAnalytics) library(dplyr) library(ade4) ### read in individual data with information for heterotic groups/oil cont etc ind <- read.csv(file = "239_PCA.csv", header = TRUE) ### Read in yo...
## Remotely: end_date <- Sys.Date()-1 start_date <- end_date - 0 queries <- do.call(rbind, lapply(seq(start_date, end_date, "day"), function(date) { cat("Fetching query features from", as.character(date), "\n") query <- paste0("ADD JAR /home/bearloga/Code/analytics-refinery-jars/refinery-hive.jar; ...
/data.R
no_license
wikimedia-research/Discovery-Search-QueryFeatures-201610
R
false
false
3,792
r
## Remotely: end_date <- Sys.Date()-1 start_date <- end_date - 0 queries <- do.call(rbind, lapply(seq(start_date, end_date, "day"), function(date) { cat("Fetching query features from", as.character(date), "\n") query <- paste0("ADD JAR /home/bearloga/Code/analytics-refinery-jars/refinery-hive.jar; ...
### run_ORYZA ### Script to run batch ORYZA model #cultivar <- "IR64" # ### Libraries #library(tidyverse) # # ### Path folders #path <- getwd() #path_data <- path_data <- paste0(path, "/DATA/") # ### load data #read_INPUT_data <- function(file) { # sheets <- readxl::excel_sheets(file) # x <- lapply(sheets,...
/run_ORYZA.R
no_license
oryza2000/ORYZA_Model_RTOOLS
R
false
false
4,765
r
### run_ORYZA ### Script to run batch ORYZA model #cultivar <- "IR64" # ### Libraries #library(tidyverse) # # ### Path folders #path <- getwd() #path_data <- path_data <- paste0(path, "/DATA/") # ### load data #read_INPUT_data <- function(file) { # sheets <- readxl::excel_sheets(file) # x <- lapply(sheets,...
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv") #Baca file ekstensi csv (?) head(mydata) #Ambil 6 data pertama tail(mydata) #Ambil 6 data terakhir logit_gre <- glm(admit ~ gre, data = mydata, family="binomial") summary(logit_gre) #Liat isi variabel logit_gre #Fungsi buat ngitung kemungkinan (...
/3Desember2018(Cogistic_Regression).R
no_license
rizqizyd/latihan-R
R
false
false
3,027
r
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv") #Baca file ekstensi csv (?) head(mydata) #Ambil 6 data pertama tail(mydata) #Ambil 6 data terakhir logit_gre <- glm(admit ~ gre, data = mydata, family="binomial") summary(logit_gre) #Liat isi variabel logit_gre #Fungsi buat ngitung kemungkinan (...
library(dplyr) install.packages("hflights") library(hflights) head(hflights) summary(hflights) nrow (hflights) ncol(hflights) ## Let's use the tbl data format (Which is a special type of data frame # that helps to work and see the original dataframe) hflights<-tbl_df(hflights) # To understand the glimpse or gist of ...
/dplyr_datacamp.R
no_license
kinsukghatak/R_Codes_data_processing
R
false
false
1,069
r
library(dplyr) install.packages("hflights") library(hflights) head(hflights) summary(hflights) nrow (hflights) ncol(hflights) ## Let's use the tbl data format (Which is a special type of data frame # that helps to work and see the original dataframe) hflights<-tbl_df(hflights) # To understand the glimpse or gist of ...
tabPanel("Select Two Individuals", wellPanel(HTML( paste( "<h1>Proof of Concept</h1>", "<p>This is a proof of concept for selecting an individual and seeing their connections.</p>", "<p>The following features are provided:</p>", "<ul>", ...
/2016 Case Studies/Cultures-of-Knowledge/ui/select-two-individuals.R
permissive
culturesofknowledge/Live-Data_Case-Studies
R
false
false
1,774
r
tabPanel("Select Two Individuals", wellPanel(HTML( paste( "<h1>Proof of Concept</h1>", "<p>This is a proof of concept for selecting an individual and seeing their connections.</p>", "<p>The following features are provided:</p>", "<ul>", ...
#' @title Extract rfPermute Importance Scores and p-values. #' @description Extract a matrix of the observed importance scores #' and p-values from the object produced by a call to \code{rfPermute} #' #' @param x An object produced by a call to \code{rfPermute}. #' @param scale For permutation based measures, should...
/rfPermute/R/rp.importance.R
no_license
ingted/R-Examples
R
false
false
2,247
r
#' @title Extract rfPermute Importance Scores and p-values. #' @description Extract a matrix of the observed importance scores #' and p-values from the object produced by a call to \code{rfPermute} #' #' @param x An object produced by a call to \code{rfPermute}. #' @param scale For permutation based measures, should...
#Read csv file #Set Value and Anomaly fields to numbers, the Date as a string. data<- read_csv("noaa-central-park.csv", col_types = cols( Date = col_character(), Value = col_double(), Anomaly = col_double() )) # Mutate the Date field into a ...
/temperature data - from d3 to R plot/temperature.R
no_license
Santostang/D3-JS-mini-project
R
false
false
1,502
r
#Read csv file #Set Value and Anomaly fields to numbers, the Date as a string. data<- read_csv("noaa-central-park.csv", col_types = cols( Date = col_character(), Value = col_double(), Anomaly = col_double() )) # Mutate the Date field into a ...
library(rdhs) ### Name: get_datasets ### Title: Get Datasets ### Aliases: get_datasets ### ** Examples ## Not run: ##D # get the model datasets included with the package ##D model_datasets <- model_datasets ##D ##D # download one of them ##D g <- get_datasets(dataset_filenames = model_datasets$FileName[1]) ## En...
/data/genthat_extracted_code/rdhs/examples/get_datasets.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
334
r
library(rdhs) ### Name: get_datasets ### Title: Get Datasets ### Aliases: get_datasets ### ** Examples ## Not run: ##D # get the model datasets included with the package ##D model_datasets <- model_datasets ##D ##D # download one of them ##D g <- get_datasets(dataset_filenames = model_datasets$FileName[1]) ## En...
source('./func/am_helper.R') source('./func/shiny_helper.R') my_colors = brewer.pal(6, "Blues") shinyServer(function(input, output, session){ ############### ## Static html pages ############### output$disclaimer = renderUI(includeHTML("./html/disclaimer.html")) output$abt = renderUI(includeHTML("./...
/server.R
no_license
HarryZhang0415/apmTool2
R
false
false
32,941
r
source('./func/am_helper.R') source('./func/shiny_helper.R') my_colors = brewer.pal(6, "Blues") shinyServer(function(input, output, session){ ############### ## Static html pages ############### output$disclaimer = renderUI(includeHTML("./html/disclaimer.html")) output$abt = renderUI(includeHTML("./...
quiet = "--quiet" %in% commandArgs(FALSE) #formats = commandArgs(TRUE) formats = "bookdown::gitbook" #formats = "bookdown::pdf_book" bookdown::render_book('index.Rmd', 'bookdown::gitbook', quiet = TRUE) # provide default formats if necessary if (length(formats) == 0) formats = c( 'bookdown::pdf_book', 'bookdown::epu...
/_render.R
no_license
shanmdphd/InternationalSchool
R
false
false
790
r
quiet = "--quiet" %in% commandArgs(FALSE) #formats = commandArgs(TRUE) formats = "bookdown::gitbook" #formats = "bookdown::pdf_book" bookdown::render_book('index.Rmd', 'bookdown::gitbook', quiet = TRUE) # provide default formats if necessary if (length(formats) == 0) formats = c( 'bookdown::pdf_book', 'bookdown::epu...
require(jsonlite) require(maptools) require(ggmap) require(dplyr) require(tidyr) require(bbplot) require(lubridate) require(parsedate) df <- fromJSON('~/Development/wanderdata-scripts/swarmapp/data/checkins.json') # json to dataframe df <- flatten(df) # create a new category column by select the category from the ne...
/swarmapp/script.R
no_license
Jagadt/wanderdata-scripts
R
false
false
765
r
require(jsonlite) require(maptools) require(ggmap) require(dplyr) require(tidyr) require(bbplot) require(lubridate) require(parsedate) df <- fromJSON('~/Development/wanderdata-scripts/swarmapp/data/checkins.json') # json to dataframe df <- flatten(df) # create a new category column by select the category from the ne...
search_optimist<-function(game){ # Get indices of payoffs c_own_own<-c(1:length(game[1,]))[c(FALSE,TRUE)] c_own_other<-c(1:length(game[1,]))[c(TRUE,FALSE)] c_other<-c(1:length(game[,1])) eye_movement<-list() # Get sequence of searched choices search_seq_bet<-sample(c_own_own,length(c_own_own),replace=F...
/Optimist.R
no_license
jmunich/EG-Eye-tracking
R
false
false
1,580
r
search_optimist<-function(game){ # Get indices of payoffs c_own_own<-c(1:length(game[1,]))[c(FALSE,TRUE)] c_own_other<-c(1:length(game[1,]))[c(TRUE,FALSE)] c_other<-c(1:length(game[,1])) eye_movement<-list() # Get sequence of searched choices search_seq_bet<-sample(c_own_own,length(c_own_own),replace=F...
#!/usr/bin/Rscript library(msarg) ## # a 2x3 grid, sampling at three corners: # # 1 . . # 2 . 3 # # and the demes are ordered like: # # 1 3 5 # 2 4 6 # # and having sizes # # 2 4 6 # 1 3 5 deme.sizes <- c(2,1,4,3,6,5) ga <- grid_array(nlayers=1,nrow=2,ncol=3,N=deme.sizes,mig.rate=10) sample.config <- sort_samp...
/tests/simple-tests.R
no_license
petrelharp/msarg
R
false
false
2,600
r
#!/usr/bin/Rscript library(msarg) ## # a 2x3 grid, sampling at three corners: # # 1 . . # 2 . 3 # # and the demes are ordered like: # # 1 3 5 # 2 4 6 # # and having sizes # # 2 4 6 # 1 3 5 deme.sizes <- c(2,1,4,3,6,5) ga <- grid_array(nlayers=1,nrow=2,ncol=3,N=deme.sizes,mig.rate=10) sample.config <- sort_samp...