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
#' distance to station #' #' @description calculates the distance of traingulations to the station with maxDB #' #' #' @author Jannis Gottwald #' #' #' #' @param data data.frame, generatet by triangulation function #' @param projList list, generatet by initProject function #' #' #' @export #' #' dist_to_stat <- fun...
/R/dist_to_stat.R
permissive
Nature40/tRackIT
R
false
false
726
r
#' distance to station #' #' @description calculates the distance of traingulations to the station with maxDB #' #' #' @author Jannis Gottwald #' #' #' #' @param data data.frame, generatet by triangulation function #' @param projList list, generatet by initProject function #' #' #' @export #' #' dist_to_stat <- fun...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{bdInvCholesky} \alias{bdInvCholesky} \title{Inverse Cholesky} \usage{ bdInvCholesky(X) } \arguments{ \item{X}{numerical matrix. If x is Hermitian and positive-definite performs} } \value{ inverse matrix of d } \description...
/man/bdInvCholesky.Rd
no_license
isglobal-brge/BigDataStatMeth
R
false
true
566
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{bdInvCholesky} \alias{bdInvCholesky} \title{Inverse Cholesky} \usage{ bdInvCholesky(X) } \arguments{ \item{X}{numerical matrix. If x is Hermitian and positive-definite performs} } \value{ inverse matrix of d } \description...
#' \code{riskprofile} #' @description Computes empirical VaR, sVaR and Stress Worst Cases from a returns xts object. #' @param x An xts object of returns. #' @return A matrix of results #' @export riskprofile #' @author Philippe Cote <coteph@@mac.com,philippe.cote@@scotiabank.com> #' @examples #' data(data) #' RTL::...
/R/riskprofile.R
no_license
bigdatalib/RTL
R
false
false
1,523
r
#' \code{riskprofile} #' @description Computes empirical VaR, sVaR and Stress Worst Cases from a returns xts object. #' @param x An xts object of returns. #' @return A matrix of results #' @export riskprofile #' @author Philippe Cote <coteph@@mac.com,philippe.cote@@scotiabank.com> #' @examples #' data(data) #' RTL::...
library(shiny) library(ggplot2) # UI with plot and widget ui <- shinyUI(fluidPage( titlePanel("Difference between automatic and manual transmissions"), sidebarLayout( sidebarPanel( h4("Difference between automatic and manual transmissions"), ...
/ui.R
no_license
r-datascience/developing_data_products
R
false
false
2,244
r
library(shiny) library(ggplot2) # UI with plot and widget ui <- shinyUI(fluidPage( titlePanel("Difference between automatic and manual transmissions"), sidebarLayout( sidebarPanel( h4("Difference between automatic and manual transmissions"), ...
# inline execution evaluator inline_evaluator <- function(expr, timelimit) { result <- NULL list( start = function() { # setTimeLimit -- if the timelimit is exceeeded an error will occur # during knit which we will catch and format within evaluate_exercise setTimeLimit(elapsed=timelimit, t...
/R/evaluators.R
permissive
VincentGuyader/learnr
R
false
false
2,721
r
# inline execution evaluator inline_evaluator <- function(expr, timelimit) { result <- NULL list( start = function() { # setTimeLimit -- if the timelimit is exceeeded an error will occur # during knit which we will catch and format within evaluate_exercise setTimeLimit(elapsed=timelimit, t...
#' Récupère toutes les tables de Mangal en lien avec un ou plusieurs datasets. #' #' \code{mangal} est en gros un wrapper autour des autres fonctions. #' #' @param dataset_name un vecteur contenant le nom du ou des datasets dont les information sur l'utilisateur qui a téléchargé les données sur Mangal sont à récupér...
/R/mangal.R
no_license
clementviolet/get_mangal
R
false
false
1,330
r
#' Récupère toutes les tables de Mangal en lien avec un ou plusieurs datasets. #' #' \code{mangal} est en gros un wrapper autour des autres fonctions. #' #' @param dataset_name un vecteur contenant le nom du ou des datasets dont les information sur l'utilisateur qui a téléchargé les données sur Mangal sont à récupér...
## project info https://www.coursera.org/learn/data-cleaning/peer/FIZtT/getting-and-cleaning-data-course-project ## project explaination ppt: https://drive.google.com/file/d/0B1r70tGT37UxYzhNQWdXS19CN1U/view run_analysis <- function () { setwd("/users/shekhar/testR/jhucoursera/jhucoursera") ## Read all the train file...
/run_analysis.R
no_license
pratyuma/coursera_GCD_proj_run_analysis
R
false
false
2,922
r
## project info https://www.coursera.org/learn/data-cleaning/peer/FIZtT/getting-and-cleaning-data-course-project ## project explaination ppt: https://drive.google.com/file/d/0B1r70tGT37UxYzhNQWdXS19CN1U/view run_analysis <- function () { setwd("/users/shekhar/testR/jhucoursera/jhucoursera") ## Read all the train file...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bijectors.R \name{tfb_softplus} \alias{tfb_softplus} \title{Computes \code{Y = g(X) = Log[1 + exp(X)]}} \usage{ tfb_softplus(hinge_softness = NULL, validate_args = FALSE, name = "softplus") } \arguments{ \item{hinge_softness}{Nonzero floati...
/man/tfb_softplus.Rd
permissive
jeffreypullin/tfprobability
R
false
true
3,290
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bijectors.R \name{tfb_softplus} \alias{tfb_softplus} \title{Computes \code{Y = g(X) = Log[1 + exp(X)]}} \usage{ tfb_softplus(hinge_softness = NULL, validate_args = FALSE, name = "softplus") } \arguments{ \item{hinge_softness}{Nonzero floati...
# # The purpose of this script is to create a data object (dto) which will hold all data and metadata. # # Run the lines below to stitch a basic html output. # knitr::stitch_rmd( # script="./manipulation/map2016/Level1_models_full_workingmem.R", # output="./manipulation/map2016/output/level1_models_wm_full.md" # ) ...
/manipulation/map2016/7-newstudy.R
no_license
beccav8/psy564_longitudinal_models
R
false
false
3,110
r
# # The purpose of this script is to create a data object (dto) which will hold all data and metadata. # # Run the lines below to stitch a basic html output. # knitr::stitch_rmd( # script="./manipulation/map2016/Level1_models_full_workingmem.R", # output="./manipulation/map2016/output/level1_models_wm_full.md" # ) ...
all_identical <- function(obj) {all(sapply(obj, function(x) identical(x, obj[[1]])))} #' Descend a result-tree #' #' DESdemonA creates a Dataset > Model > Comparison nested list, #' with everything stored at the third level of this list. results_apply #' provides a way to traverse this list, applying a function to ...
/R/helpers.r
no_license
strohstern/DESdemonA
R
false
false
9,394
r
all_identical <- function(obj) {all(sapply(obj, function(x) identical(x, obj[[1]])))} #' Descend a result-tree #' #' DESdemonA creates a Dataset > Model > Comparison nested list, #' with everything stored at the third level of this list. results_apply #' provides a way to traverse this list, applying a function to ...
\name{Rjms-package} \alias{Rjms-package} \alias{Rjms} \docType{package} \title{ R package to send messages to activeMQ } \description{ The package can be used to fire messages to an activeMQ queue or topic. It has a wide variety of applications. One such common application is firing messages during processes with a lar...
/src/main/resources/Rjms/man/Rjms-package.Rd
no_license
smschauhan/Rjms
R
false
false
3,082
rd
\name{Rjms-package} \alias{Rjms-package} \alias{Rjms} \docType{package} \title{ R package to send messages to activeMQ } \description{ The package can be used to fire messages to an activeMQ queue or topic. It has a wide variety of applications. One such common application is firing messages during processes with a lar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mergeDesc_S3_fns.R \name{latex.descMrg} \alias{latex.descMrg} \alias{htmlTable.descMrg} \alias{print.descMrg} \alias{knit_print.descMrg} \title{A wrapper around the \code{\link[htmlTable]{htmlTable}}/\code{\link[Hmisc]{latex}} function} \usag...
/man/htmlTable_latex.Rd
no_license
gforge/Gmisc
R
false
true
790
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mergeDesc_S3_fns.R \name{latex.descMrg} \alias{latex.descMrg} \alias{htmlTable.descMrg} \alias{print.descMrg} \alias{knit_print.descMrg} \title{A wrapper around the \code{\link[htmlTable]{htmlTable}}/\code{\link[Hmisc]{latex}} function} \usag...
\name{print.tjbal} \alias{print.tjbal} \title{Print Results} \description{Print results of trajectory balancing.} \usage{\method{print}{tjbal}(x, \dots)} \arguments{ \item{x}{a \code{\link{tjbal}} object.} \item{\dots}{other argv.} } \author{ Chad Hazlett <chazlett@ucla.edu>, UCLA Yiqing Xu (Maintainer) <yiqi...
/man/print.tjbal.Rd
permissive
fteng77/tjbal
R
false
false
606
rd
\name{print.tjbal} \alias{print.tjbal} \title{Print Results} \description{Print results of trajectory balancing.} \usage{\method{print}{tjbal}(x, \dots)} \arguments{ \item{x}{a \code{\link{tjbal}} object.} \item{\dots}{other argv.} } \author{ Chad Hazlett <chazlett@ucla.edu>, UCLA Yiqing Xu (Maintainer) <yiqi...
\name{SimulCASE4} \alias{SimulCASE4} \title{ Simulation of trapezoidal fuzzy numbers CASE 4 } \description{ This function generates \code{n} trapezoidal fuzzy numbers from an asymmetric distribution and with dependent components (for a detailed explanation of the simulation see the paper [1] below, namely, the Ca...
/man/SimulCASE4.Rd
no_license
cran/FuzzyStatTra
R
false
false
1,387
rd
\name{SimulCASE4} \alias{SimulCASE4} \title{ Simulation of trapezoidal fuzzy numbers CASE 4 } \description{ This function generates \code{n} trapezoidal fuzzy numbers from an asymmetric distribution and with dependent components (for a detailed explanation of the simulation see the paper [1] below, namely, the Ca...
## 00_source_usses_water_scripts.R: script to source all code to repdroduce ## analysis and results for Tredennick et al. This is the main code for the ## 'usses_water' repository. ## ## Author: Andrew Tredennick (atredenn@gmail.com) ## Date created: June 4, 2017 ## Clear the workspace rm(list=ls(all.names = TR...
/code/00_source_usses_water_scripts.R
permissive
akleinhesselink/usses_water
R
false
false
1,412
r
## 00_source_usses_water_scripts.R: script to source all code to repdroduce ## analysis and results for Tredennick et al. This is the main code for the ## 'usses_water' repository. ## ## Author: Andrew Tredennick (atredenn@gmail.com) ## Date created: June 4, 2017 ## Clear the workspace rm(list=ls(all.names = TR...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_tree.R \name{create.tree} \alias{create.tree} \title{Create a phylogenetic tree} \usage{ create.tree(nbtaxa,taxa,age_taxa=NULL,nbnodes,nodes,age_nodes=NULL,node.labels=NA,tax_selection, ultra=FALSE,format,plot=FALSE) } \arg...
/man/create.tree.Rd
no_license
jacobmaugoust/ULT
R
false
true
3,290
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_tree.R \name{create.tree} \alias{create.tree} \title{Create a phylogenetic tree} \usage{ create.tree(nbtaxa,taxa,age_taxa=NULL,nbnodes,nodes,age_nodes=NULL,node.labels=NA,tax_selection, ultra=FALSE,format,plot=FALSE) } \arg...
# df <- data.frame(x=rnorm(100), y=rnorm(100)) # # detach("package:vautils", unload=TRUE) # detach("package:ggplot2", unload=TRUE) # detach("package:base64", unload=TRUE) # # library(ggplot2) # library(vautils) # library(base64) # # 'a' %+% 'b' # ggplot(data = df, aes(x=x, y=y)) %+% geom_point() # # # library(vautil...
/test/test1.R
no_license
aushev/vautils
R
false
false
565
r
# df <- data.frame(x=rnorm(100), y=rnorm(100)) # # detach("package:vautils", unload=TRUE) # detach("package:ggplot2", unload=TRUE) # detach("package:base64", unload=TRUE) # # library(ggplot2) # library(vautils) # library(base64) # # 'a' %+% 'b' # ggplot(data = df, aes(x=x, y=y)) %+% geom_point() # # # library(vautil...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{hdbscan} \alias{hdbscan} \title{Conveinience function to perform HDBSCAN via reticulate.} \usage{ hdbscan(object, use_dimred, min_samples = 7L, min_cluster_size = 9L, outlier = 0, seed = NULL) } \arguments{ \item{object}{...
/man/hdbscan.Rd
permissive
jenzopr/singlecellutils
R
false
true
1,321
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{hdbscan} \alias{hdbscan} \title{Conveinience function to perform HDBSCAN via reticulate.} \usage{ hdbscan(object, use_dimred, min_samples = 7L, min_cluster_size = 9L, outlier = 0, seed = NULL) } \arguments{ \item{object}{...
# fruit data feature-selection project # Evan Cummings # CSCI 548 - Pattern Recognition # Douglas Raiford, Fall 2015 source("functs.r") library(MASS) # read the variable back in : f = read.csv("../../data/fruit.csv") # store the fruit 'classes' : c = f[,5] # store the fruit 'data' : d1 = f[,seq(1,4)] m1 = as.matri...
/feature_selection/src/fruit.r
no_license
pf4d/pattern_recognition
R
false
false
3,462
r
# fruit data feature-selection project # Evan Cummings # CSCI 548 - Pattern Recognition # Douglas Raiford, Fall 2015 source("functs.r") library(MASS) # read the variable back in : f = read.csv("../../data/fruit.csv") # store the fruit 'classes' : c = f[,5] # store the fruit 'data' : d1 = f[,seq(1,4)] m1 = as.matri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/packSiteTool.R \name{write_site_level_sheet} \alias{write_site_level_sheet} \title{Write Site Tool sheet} \usage{ write_site_level_sheet(wb, sheet, d) } \arguments{ \item{wb}{Openxlsx workbook object.} \item{sheet}{Name of sheet to write.} ...
/man/write_site_level_sheet.Rd
no_license
AdeBaddest/datapackr
R
false
true
492
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/packSiteTool.R \name{write_site_level_sheet} \alias{write_site_level_sheet} \title{Write Site Tool sheet} \usage{ write_site_level_sheet(wb, sheet, d) } \arguments{ \item{wb}{Openxlsx workbook object.} \item{sheet}{Name of sheet to write.} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/user_card.R \name{user_card-shiny} \alias{user_card-shiny} \alias{user_cardOutput} \alias{renderUser_card} \title{Shiny bindings for user_card} \usage{ user_cardOutput(outputId, width = "100\%", height = "400px") renderUser_card(expr, env = ...
/man/user_card-shiny.Rd
no_license
Sage-Bionetworks/shiny.synapse.react.client
R
false
true
970
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/user_card.R \name{user_card-shiny} \alias{user_card-shiny} \alias{user_cardOutput} \alias{renderUser_card} \title{Shiny bindings for user_card} \usage{ user_cardOutput(outputId, width = "100\%", height = "400px") renderUser_card(expr, env = ...
library(shiny) fluidPage( mainPanel( h3("Introduction:"), h5("This application takes your string and predict the next world"), h3("Method:"), h5("Use MLE of n-gram algorithm"), textInput("Tcir",label=h3("Type your sentence here:")), submitButton('S...
/ui.r
no_license
esther3587/NLP-Text-Predictor
R
false
false
492
r
library(shiny) fluidPage( mainPanel( h3("Introduction:"), h5("This application takes your string and predict the next world"), h3("Method:"), h5("Use MLE of n-gram algorithm"), textInput("Tcir",label=h3("Type your sentence here:")), submitButton('S...
library(tidyverse) library(RPostgreSQL) library(dbplyr) library(readr) library(lubridate) library(pool) library(naniar) library(rlist) library(missRanger) library(feather) library(readxl) library(furrr) library(geosphere) library(RPostgreSQL) library(postGIStools) library(sf) library(purrr) library(ggmap) library(po...
/6_merge_patient_acs.R
no_license
covidses/analysis_scripts
R
false
false
936
r
library(tidyverse) library(RPostgreSQL) library(dbplyr) library(readr) library(lubridate) library(pool) library(naniar) library(rlist) library(missRanger) library(feather) library(readxl) library(furrr) library(geosphere) library(RPostgreSQL) library(postGIStools) library(sf) library(purrr) library(ggmap) library(po...
% File man/SP.Rd \name{SP} \alias{SP} \title{Returns the saturation point of a queueing model} \description{ Returns the saturation point of a queueing model } \usage{ SP(x, \dots) } \arguments{ \item{x}{a object of class o_MM1KK} \item{\dots}{aditional arguments} } \details{Returns the saturation point of a q...
/man/SP.Rd
no_license
cran/queueing
R
false
false
851
rd
% File man/SP.Rd \name{SP} \alias{SP} \title{Returns the saturation point of a queueing model} \description{ Returns the saturation point of a queueing model } \usage{ SP(x, \dots) } \arguments{ \item{x}{a object of class o_MM1KK} \item{\dots}{aditional arguments} } \details{Returns the saturation point of a q...
source("ratio/auxs_funcs.R") ## Sample create ## Bank dataset load(file = "ratio/inputs/datasets/dataset.bank.RData") sample.bank = index.sample(dataset.bank$response) save(sample.bank,file = "ratio/inputs/samples/samples.bank.RData") ## Block dataset load(file = "ratio/inputs/datasets/dataset.block.RData") sample....
/ratio/sample_generation.R
no_license
afonsofvaz/ratio_estimator
R
false
false
1,042
r
source("ratio/auxs_funcs.R") ## Sample create ## Bank dataset load(file = "ratio/inputs/datasets/dataset.bank.RData") sample.bank = index.sample(dataset.bank$response) save(sample.bank,file = "ratio/inputs/samples/samples.bank.RData") ## Block dataset load(file = "ratio/inputs/datasets/dataset.block.RData") sample....
\name{logLik} \docType{methods} \alias{logLik.blm} \alias{logLik,blm-method} \alias{logLik,lexpit-method} \title{Log-likelihood of \code{blm} and \code{lexpit} objects.} \description{ Method to access the log-likelihood of the fitted \code{blm} or \code{lexpit} model. } \section{Methods}{ \describe{ \item{logLi...
/man/loglik.Rd
no_license
cran/blm
R
false
false
1,131
rd
\name{logLik} \docType{methods} \alias{logLik.blm} \alias{logLik,blm-method} \alias{logLik,lexpit-method} \title{Log-likelihood of \code{blm} and \code{lexpit} objects.} \description{ Method to access the log-likelihood of the fitted \code{blm} or \code{lexpit} model. } \section{Methods}{ \describe{ \item{logLi...
# load specs library(tidyverse) studies <- data_frame(file = dir(path = "data_specifications")) %>% mutate(file = str_replace(file, ".yaml", "")) %>% separate(file, into = c("study","format")) # this code based on github.com/langcog/metalab2/scripts/cache_datsets.R # originally by Mika Braginksy (mikabr@mit.edu)...
/common.R
permissive
RodDalBen/validator
R
false
false
4,995
r
# load specs library(tidyverse) studies <- data_frame(file = dir(path = "data_specifications")) %>% mutate(file = str_replace(file, ".yaml", "")) %>% separate(file, into = c("study","format")) # this code based on github.com/langcog/metalab2/scripts/cache_datsets.R # originally by Mika Braginksy (mikabr@mit.edu)...
Validation.LOOCV.PanelCmd <- function(clim.var){ listOpenFiles <- openFile_ttkcomboList() if(Sys.info()["sysname"] == "Windows"){ wscrlwin <- w.scale(30) hscrlwin <- h.scale(45.5) wttkcombo <- as.integer(w.scale(28)/sfont0) largeur <- as.integer(w.scale(27)/sfont0) largeur1 <- as.integer(w.scale(29)/sfont0...
/functions/validation.LOOCV_leftCmd_functions.R
no_license
rijaf/CDT
R
false
false
58,195
r
Validation.LOOCV.PanelCmd <- function(clim.var){ listOpenFiles <- openFile_ttkcomboList() if(Sys.info()["sysname"] == "Windows"){ wscrlwin <- w.scale(30) hscrlwin <- h.scale(45.5) wttkcombo <- as.integer(w.scale(28)/sfont0) largeur <- as.integer(w.scale(27)/sfont0) largeur1 <- as.integer(w.scale(29)/sfont0...
\name{TransfTra} \alias{TransfTra} \title{ Transformation of a matrix of trapezoidal fuzzy numbers into an array } \description{ This function transforms a matrix of dimension \code{n x 4} containing \code{n} trapezoidal fuzzy numbers characterized by their four values \code{inf0,inf1,sup1,sup0} into an array of ...
/man/TransfTra.Rd
no_license
cran/FuzzyStatTra
R
false
false
2,094
rd
\name{TransfTra} \alias{TransfTra} \title{ Transformation of a matrix of trapezoidal fuzzy numbers into an array } \description{ This function transforms a matrix of dimension \code{n x 4} containing \code{n} trapezoidal fuzzy numbers characterized by their four values \code{inf0,inf1,sup1,sup0} into an array of ...
####################################################################################### # # # Analyse discriminante lineaire # # ...
/03.Discriminant analysis/02.lda.R
no_license
Gorrd/projet_scoring
R
false
false
2,302
r
####################################################################################### # # # Analyse discriminante lineaire # # ...
# Step0. Prepare + download files and libraries fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" datafile <- "getdata-projectfiles-UCI.zip" datadir <- "./UCI HAR Dataset" ## # check required library-packages. install when not found. ## if (!require("data.table")) {...
/run_analysis.R
no_license
PaulCoursera/CleaningData
R
false
false
3,249
r
# Step0. Prepare + download files and libraries fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" datafile <- "getdata-projectfiles-UCI.zip" datadir <- "./UCI HAR Dataset" ## # check required library-packages. install when not found. ## if (!require("data.table")) {...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bboxplot.R \name{bboxplot} \alias{bboxplot} \alias{bboxplot.default} \alias{bboxplot.formula} \title{Beautiful boxplots with ggplot2.} \usage{ bboxplot(y, ...) \method{bboxplot}{default}(y, g, data, ...) \method{bboxplot}{formula}(formula, ...
/man/bboxplot.Rd
permissive
droubi-org/appraiseR
R
false
true
1,171
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bboxplot.R \name{bboxplot} \alias{bboxplot} \alias{bboxplot.default} \alias{bboxplot.formula} \title{Beautiful boxplots with ggplot2.} \usage{ bboxplot(y, ...) \method{bboxplot}{default}(y, g, data, ...) \method{bboxplot}{formula}(formula, ...
library(utils) library(graphics) ##Download the data and unzip the file if (!file.exists("household_power_consumption.txt")){ URL<-"http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" dataFile<-download.file(URL, destfile= "./ElectricData.zip" , method="curl") unzip(zipfile= "....
/plot4.R
no_license
soniasharma/ExData_Plotting1
R
false
false
2,008
r
library(utils) library(graphics) ##Download the data and unzip the file if (!file.exists("household_power_consumption.txt")){ URL<-"http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" dataFile<-download.file(URL, destfile= "./ElectricData.zip" , method="curl") unzip(zipfile= "....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{extract} \alias{extract} \alias{extract,mplus.model-method} \alias{extract,mplusObject-method} \alias{extract.mplus.model} \alias{extract.mplusObject} \title{Extract function to make Mplus output work with th...
/man/extract.Rd
no_license
dougtommet/MplusAutomation
R
false
true
2,388
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{extract} \alias{extract} \alias{extract,mplus.model-method} \alias{extract,mplusObject-method} \alias{extract.mplus.model} \alias{extract.mplusObject} \title{Extract function to make Mplus output work with th...
##### AUTHORS: KAIKE WESLEY AND LUCAS MASCARENHAS ##### WORK DIRECTORY # ! DEFINE YOUR WORKSPACE HERE #setwd("~/Harbinger/UFBA/2019.1/ENG438/Trabalhos") ##### LIBRARY library(quanteda) library(stopwords) library(wordcloud2) library(tidytext) library(tidyverse) library(lexiconPT) library(Matrix) library(...
/NPL-jair-bolsonaro-twitter-data/basic-npl-analysis-bolsonaro-twitter-code.R
no_license
KaikeWesleyReis/kaggle
R
false
false
8,062
r
##### AUTHORS: KAIKE WESLEY AND LUCAS MASCARENHAS ##### WORK DIRECTORY # ! DEFINE YOUR WORKSPACE HERE #setwd("~/Harbinger/UFBA/2019.1/ENG438/Trabalhos") ##### LIBRARY library(quanteda) library(stopwords) library(wordcloud2) library(tidytext) library(tidyverse) library(lexiconPT) library(Matrix) library(...
# STAT-S 610 # LAB 3 # 2020-10-02 # https://jfukuyama.github.io/teaching/stat610/assignments/lab3.pdf # TO RUN: testthat::test_dir('.') # --- setup --- # # load package functions and functions we want to test library(testthat) #import::here(compute_f_hat, llr, make_predictor_matrix, make_weight_matrix, W, ...
/test_llr.R
no_license
anna2122/s610hmwk5
R
false
false
2,377
r
# STAT-S 610 # LAB 3 # 2020-10-02 # https://jfukuyama.github.io/teaching/stat610/assignments/lab3.pdf # TO RUN: testthat::test_dir('.') # --- setup --- # # load package functions and functions we want to test library(testthat) #import::here(compute_f_hat, llr, make_predictor_matrix, make_weight_matrix, W, ...
#' @name SDMXConcept #' @docType class #' @aliases SDMXConcept-class #' #' @title Class "SDMXConcept" #' @description A basic class to handle a SDMX Concept #' #' @slot id Object of class "character" giving the ID of the concept (required) #' @slot agencyID Object of class "character" giving the AgencyID #' @slot ve...
/R/Class-SDMXConcept.R
no_license
opensdmx/rsdmx
R
false
false
3,087
r
#' @name SDMXConcept #' @docType class #' @aliases SDMXConcept-class #' #' @title Class "SDMXConcept" #' @description A basic class to handle a SDMX Concept #' #' @slot id Object of class "character" giving the ID of the concept (required) #' @slot agencyID Object of class "character" giving the AgencyID #' @slot ve...
#' The function for hierarchical imputation of binary 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 with ...
/R/hmi_imp_binary_multi_2018-02-22.R
no_license
matthiasspeidel/hmi
R
false
false
11,525
r
#' The function for hierarchical imputation of binary 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 with ...
library(parallelMCMCcombine) library(rstan) library(stargazer) library(abind) library(reshape2) library(ggplot2) # setwd("/home/brgordon/ccv103/Exercise/run") # setwd("/kellogg/users/marketing/2661703/Expenditure") run_id <- 6 setwd(paste("/sscc/home/c/ccv103/Exercise/run/estrun_", run_id, sep="")) filename <- list....
/to be deleted/share_allocation/2_mdcev_share_estimation_stan_combine.r
no_license
Superet/Expenditure
R
false
false
2,506
r
library(parallelMCMCcombine) library(rstan) library(stargazer) library(abind) library(reshape2) library(ggplot2) # setwd("/home/brgordon/ccv103/Exercise/run") # setwd("/kellogg/users/marketing/2661703/Expenditure") run_id <- 6 setwd(paste("/sscc/home/c/ccv103/Exercise/run/estrun_", run_id, sep="")) filename <- list....
# Reproduce data/tasa_desocupacion_sexo.rds import::from(haven, labelled) import::from(magrittr, "%>%", "%T>%") options(survey.lonely.psu = "certainty") tasa_desocupacion_sexo <- list.files("data/ene", pattern = "*.rds", full.names = TRUE) %>% purrr::map( ~ readRDS(.x) %>% dplyr::rename_with(~ "conglome...
/data/tasa_desocupacion_sexo.R
no_license
igutierrezm/tutorial-rmd-uc
R
false
false
1,019
r
# Reproduce data/tasa_desocupacion_sexo.rds import::from(haven, labelled) import::from(magrittr, "%>%", "%T>%") options(survey.lonely.psu = "certainty") tasa_desocupacion_sexo <- list.files("data/ene", pattern = "*.rds", full.names = TRUE) %>% purrr::map( ~ readRDS(.x) %>% dplyr::rename_with(~ "conglome...
### analysis for supplemental figure for CADD library(ggplot2) library(ggthemes) library(data.table) library(dplyr) library(cowplot) gtex_v8_figure_theme <- function() { return(theme(plot.title = element_text(face="plain",size=8), text = element_text(size=8), axis.text=element_text(size=7), panel.gri...
/plot_figureS40.R
no_license
BennyStrobes/gtex_v8_rare_variant_figure_generation
R
false
false
2,930
r
### analysis for supplemental figure for CADD library(ggplot2) library(ggthemes) library(data.table) library(dplyr) library(cowplot) gtex_v8_figure_theme <- function() { return(theme(plot.title = element_text(face="plain",size=8), text = element_text(size=8), axis.text=element_text(size=7), panel.gri...
\name{ellenberg} \alias{ellenberg} \docType{data} \title{ Hohenheim groundwater table experiment of Heinz Ellenberg } \description{ Heinz Ellenberg's historically important work on changes in the abundances of a community of grass species growing along experimental gradients of water table depth has played an important...
/man/ellenberg.Rd
no_license
fraenzi/blmeco
R
false
false
4,222
rd
\name{ellenberg} \alias{ellenberg} \docType{data} \title{ Hohenheim groundwater table experiment of Heinz Ellenberg } \description{ Heinz Ellenberg's historically important work on changes in the abundances of a community of grass species growing along experimental gradients of water table depth has played an important...
#' Extract first N moves #' #' Extract first N moves from pgn movetext into data frame #' #' @param movetext movetext string (or string vector). The standard English values are required: pawn = "P" (often not used), knight = "N", bishop = "B", rook = "R", queen = "Q", and king = "K". #' @param N integer (default 1...
/R/extract_moves.R
no_license
cran/bigchess
R
false
false
1,883
r
#' Extract first N moves #' #' Extract first N moves from pgn movetext into data frame #' #' @param movetext movetext string (or string vector). The standard English values are required: pawn = "P" (often not used), knight = "N", bishop = "B", rook = "R", queen = "Q", and king = "K". #' @param N integer (default 1...
# Github code requirement setwd("~/Github/Goalie-Fatigue/Data") filenames = Sys.glob("*.csv") data = lapply(filenames[1:50], read.csv, as.is = T, header = T, strip.white = T) #data2 <- load(filenames[1]) library(tidyverse) # Loading in data hockey1 <- data[[1]] # Looking at data str(hockey1) head(hockey1) unique(h...
/hockey_intro.R
no_license
mreyers/Goalie-Fatigue
R
false
false
16,542
r
# Github code requirement setwd("~/Github/Goalie-Fatigue/Data") filenames = Sys.glob("*.csv") data = lapply(filenames[1:50], read.csv, as.is = T, header = T, strip.white = T) #data2 <- load(filenames[1]) library(tidyverse) # Loading in data hockey1 <- data[[1]] # Looking at data str(hockey1) head(hockey1) unique(h...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/421.p-Confidence_p-Bias_CC_All.R \name{pCOpBICAS} \alias{pCOpBICAS} \title{p-Confidence and p-Bias estimation for continuity corrected ArcSine method} \usage{ pCOpBICAS(n, alp, c) } \arguments{ \item{n}{- Number of trials} \item{a...
/man/pCOpBICAS.Rd
no_license
cran/proportion
R
false
true
1,467
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/421.p-Confidence_p-Bias_CC_All.R \name{pCOpBICAS} \alias{pCOpBICAS} \title{p-Confidence and p-Bias estimation for continuity corrected ArcSine method} \usage{ pCOpBICAS(n, alp, c) } \arguments{ \item{n}{- Number of trials} \item{a...
#' @rdname cjbae_plot #' @title Simple plotting of cjbae outputs. #' @description Visualise Bayesian marginal means and AMCEs #' @param data A tidy dataframe of either AMCEs or MMs. #' @param visual Currently either "ridge" or "halfeye" - two different takes on a distribution plot. ADDED "point interval" which uses `st...
/R/cjbae_plot.R
permissive
mbarnfield/cjbae
R
false
false
5,047
r
#' @rdname cjbae_plot #' @title Simple plotting of cjbae outputs. #' @description Visualise Bayesian marginal means and AMCEs #' @param data A tidy dataframe of either AMCEs or MMs. #' @param visual Currently either "ridge" or "halfeye" - two different takes on a distribution plot. ADDED "point interval" which uses `st...
## makeCacheMatrix creates a special "matrix" to ## set the value of the matrix, get the value of the matrix, ## set the value of the inverse of the matrix, and get the value of the inverse of the matrix. makeCacheMatrix <- function(x = matrix()) { inv_x <- NULL set <- function(y) { x <<- y ...
/cachematrix.R
no_license
elaineliuyj/ProgrammingAssignment2
R
false
false
1,495
r
## makeCacheMatrix creates a special "matrix" to ## set the value of the matrix, get the value of the matrix, ## set the value of the inverse of the matrix, and get the value of the inverse of the matrix. makeCacheMatrix <- function(x = matrix()) { inv_x <- NULL set <- function(y) { x <<- y ...
#' Baseline correction for NMR spectra #' @export #' @aliases bline #' @param X NMR data matrix or dataframe with rows representing spectra. #' @description Baseline correction for NMR spectra. This function firstly estimates a baseline trend based on a asymmetric least squares. Secondly the estimated baseline is subtr...
/R/bline.R
permissive
schyen/MetaboMate
R
false
false
742
r
#' Baseline correction for NMR spectra #' @export #' @aliases bline #' @param X NMR data matrix or dataframe with rows representing spectra. #' @description Baseline correction for NMR spectra. This function firstly estimates a baseline trend based on a asymmetric least squares. Secondly the estimated baseline is subtr...
\name{rQuasi} \alias{rQuasi} \title{ Generate Quasirandom Point Pattern in Given Window } \description{ Generates a quasirandom pattern of points in any two-dimensional window. } \usage{ rQuasi(n, W, type = c("Halton", "Hammersley"), ...) } \arguments{ \item{n}{ Maximum number of points to be generated. } ...
/man/rQuasi.Rd
no_license
cuulee/spatstat
R
false
false
1,369
rd
\name{rQuasi} \alias{rQuasi} \title{ Generate Quasirandom Point Pattern in Given Window } \description{ Generates a quasirandom pattern of points in any two-dimensional window. } \usage{ rQuasi(n, W, type = c("Halton", "Hammersley"), ...) } \arguments{ \item{n}{ Maximum number of points to be generated. } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/OncoPhase.R \docType{package} \name{A-OncoPhase} \alias{A-OncoPhase} \alias{A-OncoPhase-package} \alias{OncoPhase-package} \title{OncoPhase: An R package for somatic mutations cellular prevalence quantification using haplotype phasing.} \desc...
/man/a-OncoPhase.Rd
no_license
chedonat/OncoPhase
R
false
true
3,292
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/OncoPhase.R \docType{package} \name{A-OncoPhase} \alias{A-OncoPhase} \alias{A-OncoPhase-package} \alias{OncoPhase-package} \title{OncoPhase: An R package for somatic mutations cellular prevalence quantification using haplotype phasing.} \desc...
library(shiny) library(readr) library(ggplot2) library(dplyr) library(plotly) library(stats) library(tidyr) library(dplyr) library(tibble) library(maptools) #library(tidyverse) #library(raster) #library(rgdal) #install.packages("gpclib", type="source") #library(gpclib) library(data.table) library(dplyr) #library(ggmap...
/shiny_pub_rates/server.R
no_license
paddytobias/pc_publications_binder
R
false
false
7,532
r
library(shiny) library(readr) library(ggplot2) library(dplyr) library(plotly) library(stats) library(tidyr) library(dplyr) library(tibble) library(maptools) #library(tidyverse) #library(raster) #library(rgdal) #install.packages("gpclib", type="source") #library(gpclib) library(data.table) library(dplyr) #library(ggmap...
## Break into discrete functions ## Calculate ages, toss out non-sensical records ## add longitudinal indicators ## #' Generate student-level attributes #' #' @param nstu integer, number of students to simulate #' @param control a list, defined by \code{\link{sim_control}} #' @import dplyr #' @importFrom w...
/R/sim_defaults.R
permissive
OpenSDP/OpenSDPsynthR
R
false
false
27,683
r
## Break into discrete functions ## Calculate ages, toss out non-sensical records ## add longitudinal indicators ## #' Generate student-level attributes #' #' @param nstu integer, number of students to simulate #' @param control a list, defined by \code{\link{sim_control}} #' @import dplyr #' @importFrom w...
dyn.load("check.so") check <- function(vec) { .Call("check", vec) } check(1:5) # vec is not 1 element. # NULL check(1) # [1] FALSE check("a") # [1] FALSE check(T) # [1] TRUE
/src_c/is/check.R
no_license
mareup/SapporoR
R
false
false
185
r
dyn.load("check.so") check <- function(vec) { .Call("check", vec) } check(1:5) # vec is not 1 element. # NULL check(1) # [1] FALSE check("a") # [1] FALSE check(T) # [1] TRUE
# This test function is automatically produced by the python script:/home/mm/SoilR/RPackages/SoilR/pkg/inst/tests/automatic/Rexample.py test.FourpSerial_1=function(){ require(RUnit) t_start=0 t_end=2 tn=100 tol=.02/tn print(tol) timestep=(t_end-t_start)/tn t=seq(t_start,t_end,timestep) A=new(...
/data/genthat_extracted_code/SoilR/tests/runit.FourpSerial_1.R
no_license
surayaaramli/typeRrh
R
false
false
10,725
r
# This test function is automatically produced by the python script:/home/mm/SoilR/RPackages/SoilR/pkg/inst/tests/automatic/Rexample.py test.FourpSerial_1=function(){ require(RUnit) t_start=0 t_end=2 tn=100 tol=.02/tn print(tol) timestep=(t_end-t_start)/tn t=seq(t_start,t_end,timestep) A=new(...
Xtrain<-read.table('./UCI HAR Dataset/train/X_train.txt', header=FALSE, sep="",stringsAsFactors=FALSE, fill=TRUE) Xtest<-read.table('./UCI HAR Dataset/test/X_test.txt', header=FALSE, sep="",stringsAsFactors=FALSE, fill=TRUE) subjecttrain<-read.table('./UCI HAR Dataset/train/subject_train.txt', header=FALSE, sep="",str...
/run_analysis.R
no_license
vkriszta/gettingandcleaning
R
false
false
1,873
r
Xtrain<-read.table('./UCI HAR Dataset/train/X_train.txt', header=FALSE, sep="",stringsAsFactors=FALSE, fill=TRUE) Xtest<-read.table('./UCI HAR Dataset/test/X_test.txt', header=FALSE, sep="",stringsAsFactors=FALSE, fill=TRUE) subjecttrain<-read.table('./UCI HAR Dataset/train/subject_train.txt', header=FALSE, sep="",str...
/man/lb.test.Rd
no_license
cran/spgs
R
false
false
2,188
rd
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this di...
/base/db/R/query.pft.R
permissive
PecanProject/pecan
R
false
false
4,235
r
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this di...
############################################################################## ### ### MST ### ### Generate Main ### ############################################################################## ### Copyright (c) 2015-2018, The TRONCO Team (www.troncopackage.org) ### email: tronco@disco.unimib.it ### All rights reserv...
/experiment_missing_single_1/generate.main.R
no_license
BIMIB-DISCo/MST
R
false
false
3,290
r
############################################################################## ### ### MST ### ### Generate Main ### ############################################################################## ### Copyright (c) 2015-2018, The TRONCO Team (www.troncopackage.org) ### email: tronco@disco.unimib.it ### All rights reserv...
crossvalidation = function(data, bn, loss = NULL, k = 10, m = ceiling(nrow(data)/10), folds, algorithm.args, loss.args, fit, fit.args, method, cluster = NULL, data.info, debug = FALSE) { n = nrow(data) if (method == "k-fold") { # shuffle the data to get unbiased splits (do not warn about fold size)....
/R/cv.R
no_license
e-hall-hoffarth/bnlearn
R
false
false
5,837
r
crossvalidation = function(data, bn, loss = NULL, k = 10, m = ceiling(nrow(data)/10), folds, algorithm.args, loss.args, fit, fit.args, method, cluster = NULL, data.info, debug = FALSE) { n = nrow(data) if (method == "k-fold") { # shuffle the data to get unbiased splits (do not warn about fold size)....
#' @title Score vector #' #' @description \code{score} calculates the first derivative of the log likelihood function with respect to beta, given #' some observed data \code{X} and \code{y}. #' #' @param X A numerical matrix of format n x k #' @param y A numerical vector of format n x 1 #' @param beta A numerical vecto...
/Logit/R/score.R
no_license
RomanSchu1ze/Logistic-Regression-Model
R
false
false
996
r
#' @title Score vector #' #' @description \code{score} calculates the first derivative of the log likelihood function with respect to beta, given #' some observed data \code{X} and \code{y}. #' #' @param X A numerical matrix of format n x k #' @param y A numerical vector of format n x 1 #' @param beta A numerical vecto...
\name{hclust_plot} \alias{hclust_plot} %- Also NEED an '\alias' for EACH other topic documented here. \title{ hclust_plot %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ hclust_plot(datafile = "Book1.txt", contentfile = "list.tsv", suffixes2 =...
/kftools3.0/man/hclust_plot.Rd
no_license
fredyou/chip_analysis
R
false
false
3,792
rd
\name{hclust_plot} \alias{hclust_plot} %- Also NEED an '\alias' for EACH other topic documented here. \title{ hclust_plot %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ hclust_plot(datafile = "Book1.txt", contentfile = "list.tsv", suffixes2 =...
#######################################################################################################- ## Pairwise coexistence analysis ---- ## ## to accompany ## Contains: ## 1.0 Compute the three definitions ## 2.0 Computation of Spaak definition for the paper using Carroll's definition #########################...
/Rscript/ComputeDefinition_and_approximation.R
no_license
Buchel9844/Meta-analysis_NFD
R
false
false
16,212
r
#######################################################################################################- ## Pairwise coexistence analysis ---- ## ## to accompany ## Contains: ## 1.0 Compute the three definitions ## 2.0 Computation of Spaak definition for the paper using Carroll's definition #########################...
if(!file.exists("./assignment")){dir.create("./assignment")} # Read all the required files activity<- read.table("C:/2014/Coursera/Clean data/UCI HAR Dataset/activity_labels.txt") feature<- read.table("C:/2014/Coursera/Clean data/UCI HAR Dataset/features.txt") featurename=feature[,2] ## Read the subject id's of the tr...
/run_analysis.R
no_license
SeemaChopra/Seema_Project_21_Dec
R
false
false
2,763
r
if(!file.exists("./assignment")){dir.create("./assignment")} # Read all the required files activity<- read.table("C:/2014/Coursera/Clean data/UCI HAR Dataset/activity_labels.txt") feature<- read.table("C:/2014/Coursera/Clean data/UCI HAR Dataset/features.txt") featurename=feature[,2] ## Read the subject id's of the tr...
\name{estiGeneNBstat} \alias{estiGeneNBstat} \title{ Calculate NB-statistics quantifying differential splicing for each gene } \description{ Calculate NB-statistics quantifying differential splicing for each gene between two groups of samples compared. The results will be used for GSEA run (as DS-scores). } \usage{ est...
/man/estiGeneNBstat.Rd
no_license
sunlightwang/SeqGSEA
R
false
false
1,076
rd
\name{estiGeneNBstat} \alias{estiGeneNBstat} \title{ Calculate NB-statistics quantifying differential splicing for each gene } \description{ Calculate NB-statistics quantifying differential splicing for each gene between two groups of samples compared. The results will be used for GSEA run (as DS-scores). } \usage{ est...
#' Putting the R into IRC #' #' \code{irced} : \\ˈɜrkt\\\cr #' \cr #' verb\cr #' \cr #' 1. what users in your IRC channels will become #' if you send too many automated messages. #' #' Build systems such as 'Travic-CI' have many ways to notify #' users when jobs have completed including posting a message to an IRC #' c...
/R/irced-package.R
no_license
hrbrmstr/irced
R
false
false
794
r
#' Putting the R into IRC #' #' \code{irced} : \\ˈɜrkt\\\cr #' \cr #' verb\cr #' \cr #' 1. what users in your IRC channels will become #' if you send too many automated messages. #' #' Build systems such as 'Travic-CI' have many ways to notify #' users when jobs have completed including posting a message to an IRC #' c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scdhlm-package.r \docType{data} \name{Thiemann2001} \alias{Thiemann2001} \title{Thiemann & Goldstein (2001)} \format{ A data frame with 363 rows and 8 variables } \source{ Thiemann, K.S., & Goldstein, H. (2001). Social stories, wri...
/man/Thiemann2001.Rd
no_license
cran/scdhlm
R
false
true
1,379
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scdhlm-package.r \docType{data} \name{Thiemann2001} \alias{Thiemann2001} \title{Thiemann & Goldstein (2001)} \format{ A data frame with 363 rows and 8 variables } \source{ Thiemann, K.S., & Goldstein, H. (2001). Social stories, wri...
library(pdftools) library(readxl) library(dplyr) library(stringr) library(stringdist) library(fuzzywuzzyR) library(purrr) location <- "home" #set "home", "laptop", "work" or "work-lap" if (location == "home") { oned_path <- "D:/OneDrive - Aalborg Universitet/CALDISS_projects/" } else if (location == "work") { on...
/scripts/org-lookup.R
no_license
CALDISS-AAU/eu_particip-extract
R
false
false
2,328
r
library(pdftools) library(readxl) library(dplyr) library(stringr) library(stringdist) library(fuzzywuzzyR) library(purrr) location <- "home" #set "home", "laptop", "work" or "work-lap" if (location == "home") { oned_path <- "D:/OneDrive - Aalborg Universitet/CALDISS_projects/" } else if (location == "work") { on...
.prepare_scdf <- function(data, na.rm = FALSE) { # check class scdf validity if (opt("rigorous_class_check")) { check_scdf(data) } pvar <- phase(data) mvar <- mt(data) dvar <- dv(data) # revise names ----- names(data) <- revise_names(names(data), length(data)) for(case in 1:length(da...
/R/private_prepare_scdf.R
no_license
cran/scan
R
false
false
795
r
.prepare_scdf <- function(data, na.rm = FALSE) { # check class scdf validity if (opt("rigorous_class_check")) { check_scdf(data) } pvar <- phase(data) mvar <- mt(data) dvar <- dv(data) # revise names ----- names(data) <- revise_names(names(data), length(data)) for(case in 1:length(da...
all_deg_gene_plot <- function(extend, type_of_regulation){ if(type_of_regulation == 'up'){ transcript_info <- full_transcript_info %>% filter(log2FoldChange >= 0) } else if (type_of_regulation == 'down'){ transcript_info <- full_transcript_info %>% filter(log2FoldChange <= 0) } nrows <- nrow(t...
/methylation/all_deg_gene_plot.R
no_license
qhauck16/Quinn-Summer-2020
R
false
false
3,094
r
all_deg_gene_plot <- function(extend, type_of_regulation){ if(type_of_regulation == 'up'){ transcript_info <- full_transcript_info %>% filter(log2FoldChange >= 0) } else if (type_of_regulation == 'down'){ transcript_info <- full_transcript_info %>% filter(log2FoldChange <= 0) } nrows <- nrow(t...
runData <- local(get(load("run_data.rda")))
/data/runData.R
no_license
MangoTheCat/mangoTraining
R
false
false
44
r
runData <- local(get(load("run_data.rda")))
##' @importFrom tools pkgVignettes install <- function(pkg = ".", reload = TRUE, quick = FALSE, local = TRUE, args = getOption("devtools.install.args"), quiet = FALSE, dependencies = NA, build_vignettes = !quick, keep_source = getOption("keep.source.pkgs")) { ...
/R/install.R
no_license
lazycrazyowl/packrat
R
false
false
17,418
r
##' @importFrom tools pkgVignettes install <- function(pkg = ".", reload = TRUE, quick = FALSE, local = TRUE, args = getOption("devtools.install.args"), quiet = FALSE, dependencies = NA, build_vignettes = !quick, keep_source = getOption("keep.source.pkgs")) { ...
# Exercise 8: Pulitzer Prizes # Read in the data pulitzer <- read.csv("data/pulitzer-circulation-data.csv", stringsAsFactors = FALSE) # Install and load the needed libraries # Be sure to comment out the install.packages function so it won't install it every time it runs # Remeber you only need to install a package on...
/exercise-8/exercise.R
permissive
sburd36/m11-dplyr
R
false
false
1,677
r
# Exercise 8: Pulitzer Prizes # Read in the data pulitzer <- read.csv("data/pulitzer-circulation-data.csv", stringsAsFactors = FALSE) # Install and load the needed libraries # Be sure to comment out the install.packages function so it won't install it every time it runs # Remeber you only need to install a package on...
read_to_phyloseq<- function(mapping, biom){ message(mapping) message(biom) map=phyloseq::import_qiime_sample_data(mapping) otus=phyloseq::import_biom(biom, parseFunction=parse_taxonomy_greengenes) mergedata=phyloseq::merge_phyloseq(otus,map) message("Creating a phyloseq object") }
/R/read_phyloseq.R
no_license
mirnavazquez/InsectMicrobiome
R
false
false
295
r
read_to_phyloseq<- function(mapping, biom){ message(mapping) message(biom) map=phyloseq::import_qiime_sample_data(mapping) otus=phyloseq::import_biom(biom, parseFunction=parse_taxonomy_greengenes) mergedata=phyloseq::merge_phyloseq(otus,map) message("Creating a phyloseq object") }
#' @useDynLib perfRcpp, .registration = TRUE #' @importFrom Rcpp sourceCpp #' @importFrom methods new #' @importFrom Rcpp cpp_object_initializer NULL # Need to run this first: # pkgbuild::compile_dll() # or use # load_all() # instead of devtools::document()
/with_arma/Rcpp/perfRcpp/R/perfRcpp-package.R
no_license
deanbodenham/benchmarks_rpycpp
R
false
false
259
r
#' @useDynLib perfRcpp, .registration = TRUE #' @importFrom Rcpp sourceCpp #' @importFrom methods new #' @importFrom Rcpp cpp_object_initializer NULL # Need to run this first: # pkgbuild::compile_dll() # or use # load_all() # instead of devtools::document()
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frequency_encoder.R \name{frequency_encoder} \alias{frequency_encoder} \title{frequency_encoder} \usage{ frequency_encoder(X_train, X_test = NULL, cat_columns) } \arguments{ \item{X_train}{A `tibble` or `data.frame` representing the training ...
/man/frequency_encoder.Rd
permissive
UBC-MDS/encodeR
R
false
true
956
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frequency_encoder.R \name{frequency_encoder} \alias{frequency_encoder} \title{frequency_encoder} \usage{ frequency_encoder(X_train, X_test = NULL, cat_columns) } \arguments{ \item{X_train}{A `tibble` or `data.frame` representing the training ...
get_catalog_pme <- function( data_name = "pme" , output_dir , ... ){ # read the text of the microdata ftp into working memory # download the contents of the ftp directory for all microdata ftp.listing <- readLines( textConnection( RCurl::getURL( "ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Mensal_de_Em...
/R/pme.R
no_license
ajdamico/lodown
R
false
false
3,952
r
get_catalog_pme <- function( data_name = "pme" , output_dir , ... ){ # read the text of the microdata ftp into working memory # download the contents of the ftp directory for all microdata ftp.listing <- readLines( textConnection( RCurl::getURL( "ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Mensal_de_Em...
temp <- read.table("temp.txt", sep="\t", comment.char='', as.is=TRUE) foo <- strsplit(temp$V1, "\\s") ping <- unlist(lapply(foo, function(f) which(!is.na(as.integer(f))))) counter <- as.integer(sapply(1:length(foo), function(i) { foo[[i]][ping[i]] })) summary(diff(counter)) # all 1's shortName <- unlist(sa...
/inst/extData/rewrite.R
no_license
cran/Polychrome
R
false
false
905
r
temp <- read.table("temp.txt", sep="\t", comment.char='', as.is=TRUE) foo <- strsplit(temp$V1, "\\s") ping <- unlist(lapply(foo, function(f) which(!is.na(as.integer(f))))) counter <- as.integer(sapply(1:length(foo), function(i) { foo[[i]][ping[i]] })) summary(diff(counter)) # all 1's shortName <- unlist(sa...
# Up and Running with R # Ex03_03 # Creating box plots for quantitative variables # Use dataset "social_network.csv" which records the # gender and age of 202 online survey respondents # along with their preferred social networking site # and an estimate of how many times they log in # per week. # Create data frame "...
/Exercise Files/Ch03/03_03/Ex03_03.R
no_license
sumit296/up-and-running-with-r
R
false
false
748
r
# Up and Running with R # Ex03_03 # Creating box plots for quantitative variables # Use dataset "social_network.csv" which records the # gender and age of 202 online survey respondents # along with their preferred social networking site # and an estimate of how many times they log in # per week. # Create data frame "...
# lambWT.R Calculation of the Weather types (WT) circulation indices from grid # # Copyright (C) 2019 Santander Meteorology Group (http://www.meteo.unican.es) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
/R/lambWT.R
no_license
SantanderMetGroup/climate4R.indices
R
false
false
8,965
r
# lambWT.R Calculation of the Weather types (WT) circulation indices from grid # # Copyright (C) 2019 Santander Meteorology Group (http://www.meteo.unican.es) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_cpdb2.R \name{plot_cpdb2} \alias{plot_cpdb2} \title{Plotting cellphonedb results} \usage{ plot_cpdb2( cell_type1, cell_type2, scdata, idents, means, pvals, deconvoluted, p.adjust.method = NULL, keep_significant_only = T...
/man/plot_cpdb2.Rd
permissive
EikoSAIJOU334/ktplots
R
false
true
3,020
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_cpdb2.R \name{plot_cpdb2} \alias{plot_cpdb2} \title{Plotting cellphonedb results} \usage{ plot_cpdb2( cell_type1, cell_type2, scdata, idents, means, pvals, deconvoluted, p.adjust.method = NULL, keep_significant_only = T...
f.insert.row <- function( df, newrow, r ){ if( r != ( nrow( df ) + 1 ) ){ df[ seq( r + 1, nrow( df ) + 1 ), ] <- df[ seq( r, nrow( df ) ), ] } df[ r, ] <- newrow return( df ) }
/R/f.insert.row.R
no_license
cran/Haplin
R
false
false
183
r
f.insert.row <- function( df, newrow, r ){ if( r != ( nrow( df ) + 1 ) ){ df[ seq( r + 1, nrow( df ) + 1 ), ] <- df[ seq( r, nrow( df ) ), ] } df[ r, ] <- newrow return( df ) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwiseSim.R \name{profileSimParametric} \alias{profileSimParametric} \title{Simulate complete DNA profiles given IBD coefficients} \usage{ profileSimParametric( kappa = NULL, delta = NULL, states = NULL, N = 1, freqList...
/man/profileSimParametric.Rd
no_license
cran/forrel
R
false
true
1,729
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwiseSim.R \name{profileSimParametric} \alias{profileSimParametric} \title{Simulate complete DNA profiles given IBD coefficients} \usage{ profileSimParametric( kappa = NULL, delta = NULL, states = NULL, N = 1, freqList...
library(testthat) library(ff) test_that("ffrandom works",{ set.seed(123) rnorm(1) a <- rnorm(100) set.seed(123) b <- ffrandom(100, rnorm) expect_equal(a, b[]) })
/pkg/tests/testthat/testffranfrom.R
no_license
edwindj/ffbase
R
false
false
189
r
library(testthat) library(ff) test_that("ffrandom works",{ set.seed(123) rnorm(1) a <- rnorm(100) set.seed(123) b <- ffrandom(100, rnorm) expect_equal(a, b[]) })
testlist <- list(bytes1 = c(16711971L, -50342946L, -553648128L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0) result <- do.call(mcga:::ByteCodeMutation,testlist) str(result)
/mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612802082-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
245
r
testlist <- list(bytes1 = c(16711971L, -50342946L, -553648128L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0) result <- do.call(mcga:::ByteCodeMutation,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tile_maker.R \name{finisher} \alias{finisher} \title{finisher} \usage{ finisher(title = NULL, css = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", file = NULL, textModifier = "h1", divs) } \arguments{ \item{title...
/man/finisher.Rd
permissive
YvesCR/TileMaker
R
false
true
1,282
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tile_maker.R \name{finisher} \alias{finisher} \title{finisher} \usage{ finisher(title = NULL, css = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", file = NULL, textModifier = "h1", divs) } \arguments{ \item{title...
# Gnome R Data Miner: GNOME interface to R for Data Mining # # Time-stamp: <2014-12-29 09:29:04 gjw> # # Help Menu # # Copyright (c) 2009 Togaware Pty Ltd # # This files is part of Rattle. # # Rattle is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as publis...
/R/help.R
no_license
zonquan/rattle
R
false
false
48,394
r
# Gnome R Data Miner: GNOME interface to R for Data Mining # # Time-stamp: <2014-12-29 09:29:04 gjw> # # Help Menu # # Copyright (c) 2009 Togaware Pty Ltd # # This files is part of Rattle. # # Rattle is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as publis...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kinfitr_miscfuncs.R \name{maxpercres} \alias{maxpercres} \title{Maximum Percentage Residual} \usage{ maxpercres(outputobject) } \arguments{ \item{outputobject}{The output of a kinetic model, including a fit object \code{outputobject$fit}} } \...
/man/maxpercres.Rd
no_license
eebrown/kinfitr
R
false
true
809
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kinfitr_miscfuncs.R \name{maxpercres} \alias{maxpercres} \title{Maximum Percentage Residual} \usage{ maxpercres(outputobject) } \arguments{ \item{outputobject}{The output of a kinetic model, including a fit object \code{outputobject$fit}} } \...
simudat <- function(seed,n,W,alpha,theta,xi,rlevel){ set.seed(seed) p = ncol(W) pvec_G = rep(0.05,p) X = cbind(1,replicate(1,rbinom(n,1,0.5)),replicate(1,rnorm(n))) colnames(X) = paste0('X',0:2) G <- sapply(pvec_G,function(x) rbinom(n,1,x)) # variant matrix n*p Gw <- G%*%t(W) ...
/Simulation/code/auxfuns/simudat.R
no_license
rksyouyou/SASOM-analysis
R
false
false
770
r
simudat <- function(seed,n,W,alpha,theta,xi,rlevel){ set.seed(seed) p = ncol(W) pvec_G = rep(0.05,p) X = cbind(1,replicate(1,rbinom(n,1,0.5)),replicate(1,rnorm(n))) colnames(X) = paste0('X',0:2) G <- sapply(pvec_G,function(x) rbinom(n,1,x)) # variant matrix n*p Gw <- G%*%t(W) ...
# TODO: Add comment # # Author: tiffn_000 ############################################################################### trend3monfilesdams <- dir("C:\\Users\\tiffn_000\\Documents\\GIS\\Active_sites_final\\Data\\trends\\mon3\\dams") trend3mondams <- vector("list", length(trend3monfilesdams)) for(i in 1:...
/R/trendpostprocess.R
no_license
tnkocis/stReamflowstats
R
false
false
18,825
r
# TODO: Add comment # # Author: tiffn_000 ############################################################################### trend3monfilesdams <- dir("C:\\Users\\tiffn_000\\Documents\\GIS\\Active_sites_final\\Data\\trends\\mon3\\dams") trend3mondams <- vector("list", length(trend3monfilesdams)) for(i in 1:...
rm(list = ls()) data(iris) head(iris) # Sepal.Length Sepal.Width Petal.Length Petal.Width Species # 1 5.1 3.5 1.4 0.2 setosa # 2 4.9 3.0 1.4 0.2 setosa # 3 4.7 3.2 1.3 0.2 setosa # 4 4.6 3.1 ...
/190913correlation_lm.R
no_license
t-tsukimi/memo
R
false
false
1,962
r
rm(list = ls()) data(iris) head(iris) # Sepal.Length Sepal.Width Petal.Length Petal.Width Species # 1 5.1 3.5 1.4 0.2 setosa # 2 4.9 3.0 1.4 0.2 setosa # 3 4.7 3.2 1.3 0.2 setosa # 4 4.6 3.1 ...
#' @name ds.remove.variable #' @title Delete a variable of a specific given type on the server-side #' @description A variable of a specific given type is deleted from each DataSHIELD server. #' This client function verifies that the variable exists on each server, #' before removing them from the session. #' @param...
/R/ds.remove.variable.R
no_license
patRyserWelch8/dsConnectClient
R
false
false
7,188
r
#' @name ds.remove.variable #' @title Delete a variable of a specific given type on the server-side #' @description A variable of a specific given type is deleted from each DataSHIELD server. #' This client function verifies that the variable exists on each server, #' before removing them from the session. #' @param...
############################################################################## ## Curso: FUNDAMENTOS DE LA PROGRAMACION ESTADISTICA Y DATA MINING EN R. ## ESTADISTICA DESCRIPTIVA, MODELOS DE REGRESION Y ARBOLES DE DECISION ## ## Marzo 2018 ## Docente: German Rosati #######################################...
/Scripts/C4_Starter_Script.R
no_license
gefero/fund-prog-r
R
false
false
2,697
r
############################################################################## ## Curso: FUNDAMENTOS DE LA PROGRAMACION ESTADISTICA Y DATA MINING EN R. ## ESTADISTICA DESCRIPTIVA, MODELOS DE REGRESION Y ARBOLES DE DECISION ## ## Marzo 2018 ## Docente: German Rosati #######################################...
install.packages("pacman") install.packages("rio") install_formats() ?installed.packages() # par? # regression and hierarchical clustering? # principal components?
/R Practice/initialization.R
no_license
FreddieMercy/Machine-Learning-A-Z-Hands-On-Python-R-In-Data-Science
R
false
false
167
r
install.packages("pacman") install.packages("rio") install_formats() ?installed.packages() # par? # regression and hierarchical clustering? # principal components?
##---------------------------------------------------## ##-- HELPER CODE FOR FUNCTIONS INVOLVING GAUSSIANS --## ## ## Major components are (1) functions for multivariate ## gaussian distributions and (2) functions for ## mixtures of (univariate) gaussians ## ##---------------------------------------------------...
/R/gaussian_distributions.R
no_license
muschellij2/RMP
R
false
false
5,422
r
##---------------------------------------------------## ##-- HELPER CODE FOR FUNCTIONS INVOLVING GAUSSIANS --## ## ## Major components are (1) functions for multivariate ## gaussian distributions and (2) functions for ## mixtures of (univariate) gaussians ## ##---------------------------------------------------...
####### # L 6 # ####### #写出最大似然函数 LHfunc <- function(x,y,b) { sum(y*(b[1]+b[2]*x)-log(1+exp(b[1]+b[2]*x))) } #写出渐变矩阵函数 Gradfunc <- function(x,y,b) { matrix(c(sum(y-1/(1+exp(-b[1]-b[2]*x))),sum(y*x-x/(1+exp(-b[1]-b[2]*x)))),2,1) } #写出Hessian矩阵函数 Hessfunc <- function(x,y,b) { matrix(c(sum(exp(...
/16081097 葛晨楠 LAB6(3).R
no_license
anhnguyendepocen/SC2019-assignments
R
false
false
1,224
r
####### # L 6 # ####### #写出最大似然函数 LHfunc <- function(x,y,b) { sum(y*(b[1]+b[2]*x)-log(1+exp(b[1]+b[2]*x))) } #写出渐变矩阵函数 Gradfunc <- function(x,y,b) { matrix(c(sum(y-1/(1+exp(-b[1]-b[2]*x))),sum(y*x-x/(1+exp(-b[1]-b[2]*x)))),2,1) } #写出Hessian矩阵函数 Hessfunc <- function(x,y,b) { matrix(c(sum(exp(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BlockStructure.R \name{BlockStructure} \alias{BlockStructure} \title{Ecological Block Struture plot with ggplot2 package} \usage{ BlockStructure(omega, blocker_metadata, order_metadata, palette = RColorBrewer::brewer.pal(8, "Accent"), yaxis...
/man/BlockStructure.Rd
no_license
aewhite100/ecostructure
R
false
true
3,089
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BlockStructure.R \name{BlockStructure} \alias{BlockStructure} \title{Ecological Block Struture plot with ggplot2 package} \usage{ BlockStructure(omega, blocker_metadata, order_metadata, palette = RColorBrewer::brewer.pal(8, "Accent"), yaxis...
library(proportion) ### Name: covpLT ### Title: Coverage Probability of Logit Wald method ### Aliases: covpLT ### ** Examples n= 10; alp=0.05; a=1;b=1; t1=0.93;t2=0.97 covpLT(n,alp,a,b,t1,t2)
/data/genthat_extracted_code/proportion/examples/covpLT.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
199
r
library(proportion) ### Name: covpLT ### Title: Coverage Probability of Logit Wald method ### Aliases: covpLT ### ** Examples n= 10; alp=0.05; a=1;b=1; t1=0.93;t2=0.97 covpLT(n,alp,a,b,t1,t2)
context("test emf") ## emf builds a suitable data.frame for use in fit_ssm call data(ellie) test_that("p has s3 classes `fG_ssmp`, `sf`, `data.frame`", { f <- fit_ssm(ellie, vmax=5, model = "rw", time.step = 48, optim = "nlminb", verbose = 0, emf = emf(emf.x = c(1, 1, 1, 1, 1, 10), ...
/tests/testthat/test-emf.R
no_license
JoseLastra/foieGras
R
false
false
506
r
context("test emf") ## emf builds a suitable data.frame for use in fit_ssm call data(ellie) test_that("p has s3 classes `fG_ssmp`, `sf`, `data.frame`", { f <- fit_ssm(ellie, vmax=5, model = "rw", time.step = 48, optim = "nlminb", verbose = 0, emf = emf(emf.x = c(1, 1, 1, 1, 1, 10), ...
# Code to interpolate (Norwegian) weather station data into a grid. # See http://www.geo.ut.ee/aasa/LOOM02331/R_idw_interpolation.html library(sp) library(maptools) library(ggplot2) library(gstat) nclimate <- transform(nclimate, x=longitude, y=latitude) # Duplicate nclimate nclimate <- subset(nclimate, !is.na(x) & !i...
/processing climate data/interp.r
no_license
chelseachisholm/NFI-by-KU-and-UTK
R
false
false
3,818
r
# Code to interpolate (Norwegian) weather station data into a grid. # See http://www.geo.ut.ee/aasa/LOOM02331/R_idw_interpolation.html library(sp) library(maptools) library(ggplot2) library(gstat) nclimate <- transform(nclimate, x=longitude, y=latitude) # Duplicate nclimate nclimate <- subset(nclimate, !is.na(x) & !i...
# Location folder = 'Xu 2013' file = 'Xu2013Ages13to15' # Paper data N = 152 vars = c(1:7) # Which rows/columns of cor. matrix to import Sigma = importCorMatrix(paste(folder, '/', file, '.txt', sep = ''), vars = vars) # Bootstrap correlation matrices sigmaBoot = bootstrapCor(Sigma,...
/papers/paper_Xu2013Ages13to15_Dec2016.R
no_license
areshenk-opendata/2018-karr-cfareanalysis
R
false
false
2,331
r
# Location folder = 'Xu 2013' file = 'Xu2013Ages13to15' # Paper data N = 152 vars = c(1:7) # Which rows/columns of cor. matrix to import Sigma = importCorMatrix(paste(folder, '/', file, '.txt', sep = ''), vars = vars) # Bootstrap correlation matrices sigmaBoot = bootstrapCor(Sigma,...