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
make_or_string <- function(x) { paste(paste("(", x, ")", sep = ""), collapse = "|") } service_stat_fields <- c("Aces", "Double Faults", "1st Serve", "1st Serve Points Won", "2nd Serve Points Won", "Break Points Faced", "Break Points Saved", "Service Games Played", "Service Games Won", "Service Points Won") r...
/R/fetch_summary.R
no_license
YixiongCui/deuce
R
false
false
4,088
r
make_or_string <- function(x) { paste(paste("(", x, ")", sep = ""), collapse = "|") } service_stat_fields <- c("Aces", "Double Faults", "1st Serve", "1st Serve Points Won", "2nd Serve Points Won", "Break Points Faced", "Break Points Saved", "Service Games Played", "Service Games Won", "Service Points Won") r...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 2786 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2786 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query03_query02_1344n/query03_query02_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
713
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 2786 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2786 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
#' @title Normalisation and differential analysis of an RNA-seq count table #' @author Jacques van Helden #' @description Workflow for the analysis of differential expression with RNA-seq transcripttome data. #' Includes #' \itemize{ #' \item sample-wiste descriptive statistics (central tendency, dispersion, percentile...
/scripts/RSnakeChunks/R/rna-seq_analysis.R
no_license
SnakeChunks/SnakeChunks
R
false
false
62,662
r
#' @title Normalisation and differential analysis of an RNA-seq count table #' @author Jacques van Helden #' @description Workflow for the analysis of differential expression with RNA-seq transcripttome data. #' Includes #' \itemize{ #' \item sample-wiste descriptive statistics (central tendency, dispersion, percentile...
# Platform Repository Service # # Platform Repository Service - Sage Bionetworks Platform # # The version of the OpenAPI document: develop-SNAPSHOT # Contact: thomas.yu@sagebionetworks.org # Generated by: https://openapi-generator.tech #' @docType class #' @title RowReferenceSet #' #' @description RowReferenceSet Cla...
/R/row_reference_set.R
no_license
thomasyu888/synr-sdk-client
R
false
false
4,430
r
# Platform Repository Service # # Platform Repository Service - Sage Bionetworks Platform # # The version of the OpenAPI document: develop-SNAPSHOT # Contact: thomas.yu@sagebionetworks.org # Generated by: https://openapi-generator.tech #' @docType class #' @title RowReferenceSet #' #' @description RowReferenceSet Cla...
% Auto-generated: do not edit by hand \name{htmlMeta} \alias{htmlMeta} \title{Meta component} \description{ Meta is a wrapper for the <meta> HTML5 element. CAUTION: <meta> is included for completeness, but generally will not behave as expected since <meta> tags should be static HTML content in the <head> of the doc...
/man/htmlMeta.Rd
permissive
TechDesignDuo/dash-html-components
R
false
false
4,275
rd
% Auto-generated: do not edit by hand \name{htmlMeta} \alias{htmlMeta} \title{Meta component} \description{ Meta is a wrapper for the <meta> HTML5 element. CAUTION: <meta> is included for completeness, but generally will not behave as expected since <meta> tags should be static HTML content in the <head> of the doc...
######################### ## PF bootstrap ######################### ##' Function to run a bootstrap particle filter for user defined model. ##' ##' The G function should be of the form G <- function(t,X) and return a numeric vector ##' of simulate values from \eqn{X_t | X_{t-1} = X}. For \eqn{t = 1} the function will b...
/caMisc/R/particlefilter.R
no_license
calbertsen/caMisc
R
false
false
5,766
r
######################### ## PF bootstrap ######################### ##' Function to run a bootstrap particle filter for user defined model. ##' ##' The G function should be of the form G <- function(t,X) and return a numeric vector ##' of simulate values from \eqn{X_t | X_{t-1} = X}. For \eqn{t = 1} the function will b...
# downloading some geo data for mansoor library(GEOquery) library(downloader) ## open the soft format and raw data gse = getGEO(filename = 'dataExternal/mansoor/GSE47908_series_matrix.txt.gz') ## read raw data CEL files and normalize library(affy) setwd('dataExternal/mansoor/') untar('GSE47908_RAW.tar') oData = Rea...
/geoDownload_affy_mansoor.R
permissive
uhkniazi/Scratch
R
false
false
3,834
r
# downloading some geo data for mansoor library(GEOquery) library(downloader) ## open the soft format and raw data gse = getGEO(filename = 'dataExternal/mansoor/GSE47908_series_matrix.txt.gz') ## read raw data CEL files and normalize library(affy) setwd('dataExternal/mansoor/') untar('GSE47908_RAW.tar') oData = Rea...
vis_layout <- function(edgelist, vInfo, minSpacing = 0, maxSpacing = 100, key) { require(ggraph) source("functions/functions_internal_vis_layout.R", local = TRUE) output <- internal_horizontalLayout(edgelist = edgelist, vInfo = vInfo) %>% internal_horizontalLayout_spacing(., minSpacing = minSpa...
/2022-06 - Nature Urban Sustainability/functions/function_vis_layout.R
permissive
mbedinger/USAH-outputs
R
false
false
5,023
r
vis_layout <- function(edgelist, vInfo, minSpacing = 0, maxSpacing = 100, key) { require(ggraph) source("functions/functions_internal_vis_layout.R", local = TRUE) output <- internal_horizontalLayout(edgelist = edgelist, vInfo = vInfo) %>% internal_horizontalLayout_spacing(., minSpacing = minSpa...
s <- svd(mat, 5, 7) u<-as.matrix(s$u[, 1:5]) v<-as.matrix(s$v[, 1:7]) d<-as.matrix(diag(s$d)[1:5, 1:7]) newMat <- u%*%d%*%t(v) colnames(newMat) = colnames(mat) container = create_container(newMat, as.numeric(data.label[,1]), trainSize = 1:12,testSize = 13:18, virgin = FALSE) models = train_models(container, algorithms ...
/RCode/useOfSVD.R
no_license
abhayprakash/triviaGeneration
R
false
false
486
r
s <- svd(mat, 5, 7) u<-as.matrix(s$u[, 1:5]) v<-as.matrix(s$v[, 1:7]) d<-as.matrix(diag(s$d)[1:5, 1:7]) newMat <- u%*%d%*%t(v) colnames(newMat) = colnames(mat) container = create_container(newMat, as.numeric(data.label[,1]), trainSize = 1:12,testSize = 13:18, virgin = FALSE) models = train_models(container, algorithms ...
context('Check whether the tag inheritance works.') test_that('Tags are inherited.', { expect_equal(extract_tags(orgfile[5]), "TagTwo") expect_true("* TODO Testheader " %>% extract_tags() %>% is.na()) expect_equal(extract_tags(orgfile, inherit = TRUE)[2], ...
/tests/testthat/test_extract_tags.r
no_license
lwjohnst86/orgclockr
R
false
false
464
r
context('Check whether the tag inheritance works.') test_that('Tags are inherited.', { expect_equal(extract_tags(orgfile[5]), "TagTwo") expect_true("* TODO Testheader " %>% extract_tags() %>% is.na()) expect_equal(extract_tags(orgfile, inherit = TRUE)[2], ...
#' @title #' Area Under the ROC Curve #' #' @description #' Calculates Area Under the ROC Curve #' #' @details #' If \code{returnDT=FALSE}, returns Area Under the ROC Curve.If \code{returnDT=TRUE}, returns a data.table object with #' False Positive Rate and True Positive Rate for plotting the ROC curve. #' #' @param p...
/R/auc_roc.R
no_license
juanivazquez1/mltools
R
false
false
2,607
r
#' @title #' Area Under the ROC Curve #' #' @description #' Calculates Area Under the ROC Curve #' #' @details #' If \code{returnDT=FALSE}, returns Area Under the ROC Curve.If \code{returnDT=TRUE}, returns a data.table object with #' False Positive Rate and True Positive Rate for plotting the ROC curve. #' #' @param p...
library(data.table) library(magrittr) library(dplyr) library(lpSolve) setwd('~/Dropbox/DEA Folder') m=read.csv('checkdata.csv') Inputs = as.matrix(m[,c(2,3)]) Outputs = as.matrix(m[,c(4,5,6)]) Labels = as.matrix(m[,c(1)]) i=1 BCC_Dual = function(Inputs,Outputs,i){ cons = cbind(rbind( cbind(-(Inputs[i,] %>% c), ...
/BCC_DEA_DUAL.R
no_license
njpates/R_Code
R
false
false
1,427
r
library(data.table) library(magrittr) library(dplyr) library(lpSolve) setwd('~/Dropbox/DEA Folder') m=read.csv('checkdata.csv') Inputs = as.matrix(m[,c(2,3)]) Outputs = as.matrix(m[,c(4,5,6)]) Labels = as.matrix(m[,c(1)]) i=1 BCC_Dual = function(Inputs,Outputs,i){ cons = cbind(rbind( cbind(-(Inputs[i,] %>% c), ...
########################################################################## ## start-up and clean-up functions ## ## This software is distributed under the terms of the GNU GENERAL ## PUBLIC LICENSE Version 3, April 2013. ## ## Copyright (C) 2013-present Jesus Palomo, Gonzalo Garcia-Donato, ## and Rui Paulo ## ...
/R/onAtUn.R
no_license
cran/SAVE
R
false
false
957
r
########################################################################## ## start-up and clean-up functions ## ## This software is distributed under the terms of the GNU GENERAL ## PUBLIC LICENSE Version 3, April 2013. ## ## Copyright (C) 2013-present Jesus Palomo, Gonzalo Garcia-Donato, ## and Rui Paulo ## ...
# Helper Functions # library_s <- function(...){ suppressPackageStartupMessages(library(...)) } library_s(pROC) library_s(ggplot2) library_s(scales) source("~/Documents/multiplot.R") jitter_binary <- function(x, amount = .1) { ## randomizes data for 0/1 values for use in plots. jit <- runif(length(x), 0, amou...
/helper_functions.r
no_license
ianastalosh/CFB_Analysis
R
false
false
6,145
r
# Helper Functions # library_s <- function(...){ suppressPackageStartupMessages(library(...)) } library_s(pROC) library_s(ggplot2) library_s(scales) source("~/Documents/multiplot.R") jitter_binary <- function(x, amount = .1) { ## randomizes data for 0/1 values for use in plots. jit <- runif(length(x), 0, amou...
#' Repeat phrases #' #' Create a repeat section in LilyPond readable format. #' #' These functions wraps a phrase object or a character string in LilyPond #' repeat syntax. The most basic is \code{rp} for basic wrapping a LilyPond #' \code{unfold} repeat tag around a phrase. #' This repeats the phrase \code{n} times, b...
/R/repeats.R
permissive
owenjonesuob/tabr
R
false
false
5,529
r
#' Repeat phrases #' #' Create a repeat section in LilyPond readable format. #' #' These functions wraps a phrase object or a character string in LilyPond #' repeat syntax. The most basic is \code{rp} for basic wrapping a LilyPond #' \code{unfold} repeat tag around a phrase. #' This repeats the phrase \code{n} times, b...
####################################################################### # Combine distance information ####################################################################### combineRijRMSD <- function(pdbs,lsize=1000) { cat(sprintf("combineRijRMSD\n")) lengthm <- 4 + (210 * lsize) superM2 <- matrix(ncol=length...
/Rscripts/combine_rij_rmsd.R
no_license
lsahlstr/PPI_Optimization
R
false
false
562
r
####################################################################### # Combine distance information ####################################################################### combineRijRMSD <- function(pdbs,lsize=1000) { cat(sprintf("combineRijRMSD\n")) lengthm <- 4 + (210 * lsize) superM2 <- matrix(ncol=length...
### Generate Histogram of random nubers ### library(shiny) ui<- fluidPage( sliderInput(inputId = "num", label = "Chose a number", value = 100, min = 1, max = 1000), textInput(inputId = "title", label = "Write a tit...
/histogram.R
no_license
Madhur0811/Programs
R
false
false
2,456
r
### Generate Histogram of random nubers ### library(shiny) ui<- fluidPage( sliderInput(inputId = "num", label = "Chose a number", value = 100, min = 1, max = 1000), textInput(inputId = "title", label = "Write a tit...
# IDG Deep Dive 빅 데이터로 가는 지름길 초보자를 위한 R 입문 가이드 setwd("~/Dropbox/CodeBox/RTutorials") # 설치된 package보기 installed.packages() paklist <- installed.packages() str(paklist);summary(paklist);head(paklist) # package 설치 및 업데이트 install.packages("ggplot2") # remove.packages("thepackagename") update.packages() # 함수 도움말 보기 ?plo...
/RTutorials/140329take.R
no_license
way2joy/learnR
R
false
false
4,650
r
# IDG Deep Dive 빅 데이터로 가는 지름길 초보자를 위한 R 입문 가이드 setwd("~/Dropbox/CodeBox/RTutorials") # 설치된 package보기 installed.packages() paklist <- installed.packages() str(paklist);summary(paklist);head(paklist) # package 설치 및 업데이트 install.packages("ggplot2") # remove.packages("thepackagename") update.packages() # 함수 도움말 보기 ?plo...
library(shiny) library(ggvis) source("functions.R") # Define UI for application that draws a histogram ui <- fluidPage( # Application title titlePanel("Grade visualizer"), # Sidebar with a slider input for number of bins sidebarLayout( sidebarPanel( selectInput("select", label = h3("Select va...
/hw04/app/app.R
no_license
efuna503/stat133-hws-fall17
R
false
false
1,529
r
library(shiny) library(ggvis) source("functions.R") # Define UI for application that draws a histogram ui <- fluidPage( # Application title titlePanel("Grade visualizer"), # Sidebar with a slider input for number of bins sidebarLayout( sidebarPanel( selectInput("select", label = h3("Select va...
\name{checkModel} \alias{checkModel} \title{ Check linear differential equation specifications. } \description{ A system of linear differential equations is defined by a model list of length equal to the number of variables in the system. Each variable is defined an invocation of function \code{make.Variable}...
/man/checkModel.Rd
no_license
cran/Data2LD
R
false
false
3,841
rd
\name{checkModel} \alias{checkModel} \title{ Check linear differential equation specifications. } \description{ A system of linear differential equations is defined by a model list of length equal to the number of variables in the system. Each variable is defined an invocation of function \code{make.Variable}...
run_analysis <- function() { require(dplyr, warn.conflicts = FALSE) # Sets the working directory to the project folder (the folder in which this # script file is currently in). previousWD <- getwd() newWD <- getSrcDirectory(function(x) {x}) setwd(newWD) ################################################...
/run_analysis.R
no_license
ericsantos11019/GCDCourseProject
R
false
false
7,793
r
run_analysis <- function() { require(dplyr, warn.conflicts = FALSE) # Sets the working directory to the project folder (the folder in which this # script file is currently in). previousWD <- getwd() newWD <- getSrcDirectory(function(x) {x}) setwd(newWD) ################################################...
\name{solar.zenith.angle} \alias{solar.zenith.angle} \title{ Calculate solor zenith angle } \description{ Calculates the sun zenith angle from time and lat/lng information. } \usage{ solar.zenith.angle(tm = 0, lng = 0, lat = 0) } \arguments{ \item{tm}{ (chron) time } \item{lng}{ (numeric) longitude }...
/upcoming_man/solar.zenith.angle.Rd
no_license
ayanu/airpolmodchem
R
false
false
504
rd
\name{solar.zenith.angle} \alias{solar.zenith.angle} \title{ Calculate solor zenith angle } \description{ Calculates the sun zenith angle from time and lat/lng information. } \usage{ solar.zenith.angle(tm = 0, lng = 0, lat = 0) } \arguments{ \item{tm}{ (chron) time } \item{lng}{ (numeric) longitude }...
library(palettetown) ### Name: ichooseyou ### Title: Get a pokemon palette. Alias for pokepal. ### Aliases: ichooseyou ### ** Examples library(magrittr) pal <- 'Hoothoot' %>% ichooseyou pal2 <- 'Pichu' %>% ichooseyou(6)
/data/genthat_extracted_code/palettetown/examples/ichooseyou.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
228
r
library(palettetown) ### Name: ichooseyou ### Title: Get a pokemon palette. Alias for pokepal. ### Aliases: ichooseyou ### ** Examples library(magrittr) pal <- 'Hoothoot' %>% ichooseyou pal2 <- 'Pichu' %>% ichooseyou(6)
#read the data set setwd("~/Box Sync/2016 Spring/Data Science/Exploratory Data Analysis/week 1") house<-read.table("household_power_consumption.txt",header = TRUE,sep = ";") house$Date<-as.Date(house$Date,"%d/%m/%Y") sample_house<-subset(house,house$Date== "2007-02-02" | house$Date=="2007-02-01" ) sample_house$Global...
/plot 1.R
no_license
suffenjoy/ExData_Plotting1
R
false
false
759
r
#read the data set setwd("~/Box Sync/2016 Spring/Data Science/Exploratory Data Analysis/week 1") house<-read.table("household_power_consumption.txt",header = TRUE,sep = ";") house$Date<-as.Date(house$Date,"%d/%m/%Y") sample_house<-subset(house,house$Date== "2007-02-02" | house$Date=="2007-02-01" ) sample_house$Global...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Mussel_pop_skeleton.R \name{Mussel_pop_skeleton} \alias{Mussel_pop_skeleton} \title{Creates the folders structure for Mussel population model} \usage{ Mussel_pop_skeleton(userpath) } \arguments{ \item{userpath}{the path where forcing...
/man/Mussel_pop_skeleton.Rd
no_license
juliablanchard/RAC
R
false
true
417
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Mussel_pop_skeleton.R \name{Mussel_pop_skeleton} \alias{Mussel_pop_skeleton} \title{Creates the folders structure for Mussel population model} \usage{ Mussel_pop_skeleton(userpath) } \arguments{ \item{userpath}{the path where forcing...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/orcid_other_names.R \name{orcid_other_names} \alias{orcid_other_names} \title{Get education information for a person} \usage{ orcid_other_names(orcid, put_code = NULL, format = "application/json", ...) } \arguments{ \item{orcid}{(character)...
/man/orcid_other_names.Rd
permissive
awconway/rorcid
R
false
true
1,472
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/orcid_other_names.R \name{orcid_other_names} \alias{orcid_other_names} \title{Get education information for a person} \usage{ orcid_other_names(orcid, put_code = NULL, format = "application/json", ...) } \arguments{ \item{orcid}{(character)...
\name{clinicalData} \alias{clinicalData} \docType{data} \title{ Clinical Data Table & Variable Definitions } \description{ Clinical data for all samples across all studies, and corresponding variable definitions. Rownames are the GEO_GSMID feature, which corresponds to the sample names in the expression object for a ce...
/package/curatedBreastData/man/clinicalData.Rd
no_license
sunqiangzai/curatedBreastCancer
R
false
false
3,053
rd
\name{clinicalData} \alias{clinicalData} \docType{data} \title{ Clinical Data Table & Variable Definitions } \description{ Clinical data for all samples across all studies, and corresponding variable definitions. Rownames are the GEO_GSMID feature, which corresponds to the sample names in the expression object for a ce...
# library(mapview) # library(sp) # library(raster) # library(ggplot2) # library("rgdal") # library("gdalUtils") # library(data.table) # library(geojsonio) # library(maptools) # roadsCH <- readShapeLines("roads.shp") # waterwaysCH<- readOGR(".","waterways") # ogrInfo(".", "waterways") # mapview(waterwaysCH, ...
/mapview/R/useCase.R
no_license
ingted/R-Examples
R
false
false
608
r
# library(mapview) # library(sp) # library(raster) # library(ggplot2) # library("rgdal") # library("gdalUtils") # library(data.table) # library(geojsonio) # library(maptools) # roadsCH <- readShapeLines("roads.shp") # waterwaysCH<- readOGR(".","waterways") # ogrInfo(".", "waterways") # mapview(waterwaysCH, ...
\name{basisFunctions} \alias{basisFunctions} \title{ Informed basis set } \description{ This function produces the impulse response for the canonical haemodynamic response function and its derivatives in time and space at a desired sampling rate. } \usage{ basisFunctions(RT,orth=TRUE) } \arguments{ \item{...
/man/basisFunctions.Rd
no_license
cran/FIACH
R
false
false
1,291
rd
\name{basisFunctions} \alias{basisFunctions} \title{ Informed basis set } \description{ This function produces the impulse response for the canonical haemodynamic response function and its derivatives in time and space at a desired sampling rate. } \usage{ basisFunctions(RT,orth=TRUE) } \arguments{ \item{...
text_cleaning<-function(){ corp_list<-list(poetry,porse) for(i in c(1,2)){ toSpace <- content_transformer(function (x , pattern ) gsub(pattern, " ", x)) corp_list[[i]] <- tm_map(corp_list[[i]], toSpace, "/") corp_list[[i]] <- tm_map(corp_list[[i]], toSpace, "@") corp_list[[i]] <- tm_map(corp_list...
/tex_cleaning.R
no_license
ankitccuser187/Locus
R
false
false
1,500
r
text_cleaning<-function(){ corp_list<-list(poetry,porse) for(i in c(1,2)){ toSpace <- content_transformer(function (x , pattern ) gsub(pattern, " ", x)) corp_list[[i]] <- tm_map(corp_list[[i]], toSpace, "/") corp_list[[i]] <- tm_map(corp_list[[i]], toSpace, "@") corp_list[[i]] <- tm_map(corp_list...
# ------------------------------------------------------ # Merritt Burch # # mbb262@cornell.edu # # 2018-11-07 # # Script to parse three genome BLAST results # for summary statstics, # This version has updated gene IDs that include # the start and stop positions # # Input: blast tabular output from alignment of # ...
/src/top_blast.R
no_license
merkhaiburch/blastdb
R
false
false
4,516
r
# ------------------------------------------------------ # Merritt Burch # # mbb262@cornell.edu # # 2018-11-07 # # Script to parse three genome BLAST results # for summary statstics, # This version has updated gene IDs that include # the start and stop positions # # Input: blast tabular output from alignment of # ...
#' Read `fars` data from file #' #' This function takes a path to a file containing `fars` data, reads #' the data from the file, and returns it as a tibble #' ([dplyr::tbl_df]). #' #' @param filename Path to the file containing the data. #' #' @return A tibble ([dplyr::tbl_df]) with the data read from the file. #' #' ...
/R/fars_functions.R
permissive
adbjesus/assignment04
R
false
false
5,148
r
#' Read `fars` data from file #' #' This function takes a path to a file containing `fars` data, reads #' the data from the file, and returns it as a tibble #' ([dplyr::tbl_df]). #' #' @param filename Path to the file containing the data. #' #' @return A tibble ([dplyr::tbl_df]) with the data read from the file. #' #' ...
# https://rpubs.com/joshyazman/sentiment-analysis-lexicon-comparison # https://www.tidytextmining.com/ # https://lizrush.gitbooks.io/algorithms-for-webdevs-ebook/content/ # https://www.kaggle.com/xvivancos/analyzing-star-wars-movie-scripts # https://www.kaggle.com/cosinektheta/mining-the-women-s-clothing-reviews # http...
/code/plot_text_responses.R
permissive
UMPDA1/UMPDA_PostdocSurvey_2018
R
false
false
30,614
r
# https://rpubs.com/joshyazman/sentiment-analysis-lexicon-comparison # https://www.tidytextmining.com/ # https://lizrush.gitbooks.io/algorithms-for-webdevs-ebook/content/ # https://www.kaggle.com/xvivancos/analyzing-star-wars-movie-scripts # https://www.kaggle.com/cosinektheta/mining-the-women-s-clothing-reviews # http...
#Exercise 1 Writing a DAG #There is no x because we are assuming it is measured without error. #Exercise 2 #use priors that are informative whenever possible. # Exercise 3 Using for loops for(i in 1:5){ b[i] ~ dnorm(0, .000001) } #Exercise 4 sink("LogisticJAGS.R") cat(" model{ # priors K ~ dunif(0, 4000) r...
/key_lab4.r
no_license
wu16/Bayes
R
false
false
3,103
r
#Exercise 1 Writing a DAG #There is no x because we are assuming it is measured without error. #Exercise 2 #use priors that are informative whenever possible. # Exercise 3 Using for loops for(i in 1:5){ b[i] ~ dnorm(0, .000001) } #Exercise 4 sink("LogisticJAGS.R") cat(" model{ # priors K ~ dunif(0, 4000) r...
www = "http://www.ida.liu.se/~732A37/T1-9.dat" data <- read.delim(www, header = FALSE, sep="\t") colnames(data) <- c("NAT","100m(s)","200m(s)","400m(s)", "800m(min)","1500m(min)","3000m(min)","Mara(min)") #head(data) nations <- as.character(data[,1]) data <- data[,-1] col_mu <- colMeans(data) col_si...
/R/labreport3.R
no_license
Noufal21/732A37
R
false
false
3,806
r
www = "http://www.ida.liu.se/~732A37/T1-9.dat" data <- read.delim(www, header = FALSE, sep="\t") colnames(data) <- c("NAT","100m(s)","200m(s)","400m(s)", "800m(min)","1500m(min)","3000m(min)","Mara(min)") #head(data) nations <- as.character(data[,1]) data <- data[,-1] col_mu <- colMeans(data) col_si...
# Function for plotting 96-long signatures / profiles with or without CIs plot_sig_wb <- function (mut_matrix, colors=NA, norm=T, ymax = NA, ymin = NA, flip=F, ind=F, font=11, size=12, CI = F, low = NULL, high = NULL, DNV = FALSE, diff_scale = F, rownames = T, diff_limi...
/plotting_functions.R
no_license
nvolkova/signature-interactions
R
false
false
41,081
r
# Function for plotting 96-long signatures / profiles with or without CIs plot_sig_wb <- function (mut_matrix, colors=NA, norm=T, ymax = NA, ymin = NA, flip=F, ind=F, font=11, size=12, CI = F, low = NULL, high = NULL, DNV = FALSE, diff_scale = F, rownames = T, diff_limi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/methods.R \name{sracipeConfig<-} \alias{sracipeConfig<-} \alias{sracipeConfig<-,RacipeSE-method} \alias{sracipeConfig-set} \title{A method to access the simulation hyperparameters} \usage{ sracipeConfig(.object) <- value \S4...
/man/sracipeConfig-set.Rd
permissive
vivekkohar/sRACIPE
R
false
true
741
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/methods.R \name{sracipeConfig<-} \alias{sracipeConfig<-} \alias{sracipeConfig<-,RacipeSE-method} \alias{sracipeConfig-set} \title{A method to access the simulation hyperparameters} \usage{ sracipeConfig(.object) <- value \S4...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_density.R \name{get_density} \alias{get_density} \title{get_density} \usage{ get_density(x, y, ...) } \value{ } \description{ this gets density }
/man/get_density.Rd
no_license
sportiellomike/spookyflow
R
false
true
229
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_density.R \name{get_density} \alias{get_density} \title{get_density} \usage{ get_density(x, y, ...) } \value{ } \description{ this gets density }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delete_nodes_ws.R \name{delete_nodes_ws} \alias{delete_nodes_ws} \title{Delete all nodes in a node selection} \usage{ delete_nodes_ws(graph) } \arguments{ \item{graph}{A graph object of class \code{dgr_graph}.} } \value{ A graph object of cla...
/man/delete_nodes_ws.Rd
permissive
nograpes/DiagrammeR
R
false
true
1,817
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delete_nodes_ws.R \name{delete_nodes_ws} \alias{delete_nodes_ws} \title{Delete all nodes in a node selection} \usage{ delete_nodes_ws(graph) } \arguments{ \item{graph}{A graph object of class \code{dgr_graph}.} } \value{ A graph object of cla...
ifnull <- function(arg) { if(is.null(arg)) return("") else return(arg) } #' @title Get JavaScript code for filters' selectizeInput onchange event #' #' @description Helper function to create the JavaScript event handler code for #' the \code{selectizeInput} filters of a shiny app using \code{shinyfilters}. #' #...
/R/shinyfilter.r
no_license
jimsforks/shinyfilter
R
false
false
18,577
r
ifnull <- function(arg) { if(is.null(arg)) return("") else return(arg) } #' @title Get JavaScript code for filters' selectizeInput onchange event #' #' @description Helper function to create the JavaScript event handler code for #' the \code{selectizeInput} filters of a shiny app using \code{shinyfilters}. #' #...
# Load packages (R studio should suggest installation of those, that are not present on your computer) library(Morpho) library(geomorph) library(abind) library(RRPP) library(ggpubr) library(standardize) library(lmerTest) library(vioplot) library(randomcoloR) library(ggplot2) library(ppcor) library(ggforti...
/19_Shortened_by_function.R
no_license
costlysignalling/TheorBiol2020
R
false
false
9,011
r
# Load packages (R studio should suggest installation of those, that are not present on your computer) library(Morpho) library(geomorph) library(abind) library(RRPP) library(ggpubr) library(standardize) library(lmerTest) library(vioplot) library(randomcoloR) library(ggplot2) library(ppcor) library(ggforti...
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 6.95356800417619e-310, 1.84168863496192e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0...
/dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609871776-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
410
r
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 6.95356800417619e-310, 1.84168863496192e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0...
setwd("E:/study/ComputerPrograms/courseCode/dataScienceCoursera/exploratoryDataAnalysis/project1") # read the data electricPowerConsumption <- read.table("household_power_consumption.txt", header = TRUE, sep = ";" , na.strings = "?", stringsAsFactors=FALSE) # get the plot data a...
/plot3.R
no_license
houxianxu/ExData_Plotting1
R
false
false
1,058
r
setwd("E:/study/ComputerPrograms/courseCode/dataScienceCoursera/exploratoryDataAnalysis/project1") # read the data electricPowerConsumption <- read.table("household_power_consumption.txt", header = TRUE, sep = ";" , na.strings = "?", stringsAsFactors=FALSE) # get the plot data a...
\name{getInterRGB} \alias{getInterRGB} \title{ getInterRGB } \description{ Interpolate colors in RGB-specified bounds. } \usage{ getInterRGB(vals, zeroColor, oneColor) } \arguments{ \item{vals}{ values in [0,1]. The resulting interpolated color will be value*oneColor + (1-value)*zeroColor, in Lab space. } \item{zer...
/man/getInterRGB.Rd
no_license
xieziwen/patchPlot
R
false
false
702
rd
\name{getInterRGB} \alias{getInterRGB} \title{ getInterRGB } \description{ Interpolate colors in RGB-specified bounds. } \usage{ getInterRGB(vals, zeroColor, oneColor) } \arguments{ \item{vals}{ values in [0,1]. The resulting interpolated color will be value*oneColor + (1-value)*zeroColor, in Lab space. } \item{zer...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nraIndikatorSNM.R \name{nraIndikatorSNM} \alias{nraIndikatorSNM} \title{Denne lager en figur som er en sammenstilling av alle kvalitetsindikatorene til NRA ved snm.} \usage{ nraIndikatorSNM( outfile = "", dekngrad = 85, posTestBedr75 = ...
/man/nraIndikatorSNM.Rd
no_license
Rapporteket/nra
R
false
true
728
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nraIndikatorSNM.R \name{nraIndikatorSNM} \alias{nraIndikatorSNM} \title{Denne lager en figur som er en sammenstilling av alle kvalitetsindikatorene til NRA ved snm.} \usage{ nraIndikatorSNM( outfile = "", dekngrad = 85, posTestBedr75 = ...
library(qiime2R) library(phyloseq) library(ggplot2) library(DESeq2) ps<-qza_to_phyloseq(features = "table_ticks.qza",tree = "tree_ticks.qza",metadata = "manifest_ticks.tsv",taxonomy = "tax.qza") ps.rarefied = rarefy_even_depth(ps, rngseed=1, sample.size=0.9*min(sample_sums(ps)), replace=F) plot_bar(ps.rarefied, fill=...
/ticks.r
no_license
said3427/skin_microbiome_code
R
false
false
3,551
r
library(qiime2R) library(phyloseq) library(ggplot2) library(DESeq2) ps<-qza_to_phyloseq(features = "table_ticks.qza",tree = "tree_ticks.qza",metadata = "manifest_ticks.tsv",taxonomy = "tax.qza") ps.rarefied = rarefy_even_depth(ps, rngseed=1, sample.size=0.9*min(sample_sums(ps)), replace=F) plot_bar(ps.rarefied, fill=...
# HW 4 # Writing functions # Due Thursday February 26th by midnight # This .r file should contain your code #### Function #1 # Implement the function "listLengths". # Input variable: # <data.list>: a list whose elements are vectors of varying length # Output variable: # <element.lengths>: a numeric vector whose en...
/hw4/hw4.r
no_license
hkl21/stat133
R
false
false
6,342
r
# HW 4 # Writing functions # Due Thursday February 26th by midnight # This .r file should contain your code #### Function #1 # Implement the function "listLengths". # Input variable: # <data.list>: a list whose elements are vectors of varying length # Output variable: # <element.lengths>: a numeric vector whose en...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ts_month_decomp.R \name{ts_month_decomp} \alias{ts_month_decomp} \title{Time Series Decomposition for Monthly Crime Data} \usage{ ts_month_decomp(data, start) } \arguments{ \item{data}{Data frame of crime or RMS data. See provided Ch...
/man/ts_month_decomp.Rd
no_license
cran/rcrimeanalysis
R
false
true
1,479
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ts_month_decomp.R \name{ts_month_decomp} \alias{ts_month_decomp} \title{Time Series Decomposition for Monthly Crime Data} \usage{ ts_month_decomp(data, start) } \arguments{ \item{data}{Data frame of crime or RMS data. See provided Ch...
library(dplyr) ## Set work directory if needed ## setwd("./Exploratory-data-analysis/W_1/") ## Read Data powerConsumption <- read.csv2("household_power_consumption.txt", dec = ".", colClasses = c("character", "character", "numeric", "numeric", "num...
/plot4.R
no_license
jhuang0909/ExData_Plotting1
R
false
false
2,103
r
library(dplyr) ## Set work directory if needed ## setwd("./Exploratory-data-analysis/W_1/") ## Read Data powerConsumption <- read.csv2("household_power_consumption.txt", dec = ".", colClasses = c("character", "character", "numeric", "numeric", "num...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fundamentals.service.R \name{getStandardizedFinancialsTable} \alias{getStandardizedFinancialsTable} \title{Returns professional-grade standardized historical financial data for the given \code{id}.} \usage{ getStandardizedFinancialsTable(id) ...
/man/getStandardizedFinancialsTable.Rd
no_license
mjdhasan/intrinoR
R
false
true
1,190
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fundamentals.service.R \name{getStandardizedFinancialsTable} \alias{getStandardizedFinancialsTable} \title{Returns professional-grade standardized historical financial data for the given \code{id}.} \usage{ getStandardizedFinancialsTable(id) ...
| pc = 0xc002 | a = 0x10 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc004 | a = 0x10 | x = 0x00 | y = 0x01 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc006 | a = 0x10 | x = 0x00 | y = 0x01 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0001] = 0x10 | | pc = 0xc008 | a = 0x30 | x = 0x00...
/res/sbc-8.r
no_license
HeitorBRaymundo/861
R
false
false
570
r
| pc = 0xc002 | a = 0x10 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc004 | a = 0x10 | x = 0x00 | y = 0x01 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc006 | a = 0x10 | x = 0x00 | y = 0x01 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0001] = 0x10 | | pc = 0xc008 | a = 0x30 | x = 0x00...
# EBIC Function given data and A.hat EBIC <- function(X,Y,beta.hat){ # beta.hat: pM2 dimensions n <- nrow(X) M <- ncol(Y) p <- ncol(X)/M # Extract Sparsity Pattern sp.pattern.pM2 <- (beta.hat != 0) select <- rep(c(rep(T,M), rep(F,M^2-M)),p) sp.pattern.pM <- sp.pattern.pM2[select] # From pM^2 to pM ...
/Functions/ebic.R
no_license
boxinz17/FGM_Neighborhood
R
false
false
4,101
r
# EBIC Function given data and A.hat EBIC <- function(X,Y,beta.hat){ # beta.hat: pM2 dimensions n <- nrow(X) M <- ncol(Y) p <- ncol(X)/M # Extract Sparsity Pattern sp.pattern.pM2 <- (beta.hat != 0) select <- rep(c(rep(T,M), rep(F,M^2-M)),p) sp.pattern.pM <- sp.pattern.pM2[select] # From pM^2 to pM ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nFInc.R \name{nFInc} \alias{nFInc} \title{This function requires as the input the number associated to one airline and returns the number of fatal incidents experienced by that airline between 2000 and 2014.} \usage{ nFInc(airline) } \argumen...
/man/nFInc.Rd
no_license
pietromatteo/f0e7a855
R
false
true
532
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nFInc.R \name{nFInc} \alias{nFInc} \title{This function requires as the input the number associated to one airline and returns the number of fatal incidents experienced by that airline between 2000 and 2014.} \usage{ nFInc(airline) } \argumen...
make_delta_intermediate_root_pool_function <- function(inDF,var.col) { ### extract start and end date s.date <- min(inDF$Date) e.date <- max(inDF$Date) ### Change column name of value variable colnames(inDF)[var.col] <- "Value" inDF$Date <- as.character(inDF$Date) eDF <- subse...
/modules/intermediate_root_pool/make_delta_intermediate_root_pool_function.R
no_license
mingkaijiang/EucFACE_carbon_budget_paper
R
false
false
857
r
make_delta_intermediate_root_pool_function <- function(inDF,var.col) { ### extract start and end date s.date <- min(inDF$Date) e.date <- max(inDF$Date) ### Change column name of value variable colnames(inDF)[var.col] <- "Value" inDF$Date <- as.character(inDF$Date) eDF <- subse...
#' Get nodes that form the graph periphery #' @description Get those nodes that are part of the #' graph periphery (i.e., have the maximum eccentricity #' in the graph). #' @param graph a graph object of class #' \code{dgr_graph}. #' @return a vector of node IDs. #' @examples #' \dontrun{ #' # Get the nodes that are in...
/R/get_periphery.R
no_license
timelyportfolio/DiagrammeR
R
false
false
898
r
#' Get nodes that form the graph periphery #' @description Get those nodes that are part of the #' graph periphery (i.e., have the maximum eccentricity #' in the graph). #' @param graph a graph object of class #' \code{dgr_graph}. #' @return a vector of node IDs. #' @examples #' \dontrun{ #' # Get the nodes that are in...
saved <- list(list(1, -1, -1, c(0, 0.0238373451741061, 0.0397289086235102, 0.0556204720729142, 0.0715120355223183, 0.0874035989717224, 0.103295162421126, 0.119186725870531, 0.135078289319935, 0.150969852769339, 0.166861416218743, 0.182752979668147, 0.198644543117551, 0.214536106566955, 0.230427670016359, 0.24631923...
/archive/save_real-time_control_Normal.r
no_license
JavierQC/spatcontrol
R
false
false
14,885
r
saved <- list(list(1, -1, -1, c(0, 0.0238373451741061, 0.0397289086235102, 0.0556204720729142, 0.0715120355223183, 0.0874035989717224, 0.103295162421126, 0.119186725870531, 0.135078289319935, 0.150969852769339, 0.166861416218743, 0.182752979668147, 0.198644543117551, 0.214536106566955, 0.230427670016359, 0.24631923...
# this script is used to draw the heatmap of metaTAD # --- this is the example, used the chr6. #--- read the file setwd("/DATA/work/lbyybl/wh/ruvb2/Hi-C/sample0227/merge/meta_TAD/juicer/wt_tad") setwd("/DATA/work/lbyybl/wh/ruvb2/Hi-C/sample0227/merge/meta_TAD/juicer/ko_tad") setwd('/DATA/work/lbyybl/wh/ruvb2/Hi...
/ruvb2/Hi-C/metaTAD/metaTAD.r
no_license
Wenxue-PKU/script
R
false
false
7,074
r
# this script is used to draw the heatmap of metaTAD # --- this is the example, used the chr6. #--- read the file setwd("/DATA/work/lbyybl/wh/ruvb2/Hi-C/sample0227/merge/meta_TAD/juicer/wt_tad") setwd("/DATA/work/lbyybl/wh/ruvb2/Hi-C/sample0227/merge/meta_TAD/juicer/ko_tad") setwd('/DATA/work/lbyybl/wh/ruvb2/Hi...
#' Plot Transition and Trasnversion ratios. #' @description Takes results generated from \code{titv} and plots the Ti/Tv ratios and contributions of 6 mutational conversion classes in each sample. #' #' @param res results generated by \code{\link{titv}} #' @param file basename for output file name. If given pdf will be...
/R/plotTiTv.R
permissive
kpjonsson/maftools
R
false
false
4,026
r
#' Plot Transition and Trasnversion ratios. #' @description Takes results generated from \code{titv} and plots the Ti/Tv ratios and contributions of 6 mutational conversion classes in each sample. #' #' @param res results generated by \code{\link{titv}} #' @param file basename for output file name. If given pdf will be...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{find_package} \alias{find_package} \title{find the root package folder} \usage{ find_package(path = getwd()) } \arguments{ \item{path}{a character} } \description{ This function searches backwards in the folder structure until i...
/man/find_package.Rd
no_license
kongdd/languageserver
R
false
true
407
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{find_package} \alias{find_package} \title{find the root package folder} \usage{ find_package(path = getwd()) } \arguments{ \item{path}{a character} } \description{ This function searches backwards in the folder structure until i...
#Date: Date in format dd/mm/yyyy #Time: time in format hh:mm:ss #Global_active_power: household global minute-averaged active power (in kilowatt) #Global_reactive_power: household global minute-averaged reactive power (in kilowatt) #Voltage: minute-averaged voltage (in volt) #Global_intensity: household global minute-a...
/plot1.R
no_license
peremyslova/ExData_Plotting1
R
false
false
3,046
r
#Date: Date in format dd/mm/yyyy #Time: time in format hh:mm:ss #Global_active_power: household global minute-averaged active power (in kilowatt) #Global_reactive_power: household global minute-averaged reactive power (in kilowatt) #Voltage: minute-averaged voltage (in volt) #Global_intensity: household global minute-a...
rm(list=ls()) install.packages("PerformanceAnalytics") install.packages("zoo") install.packages("quantmod") install.packages("lubridate") install.packages("plyr") install.packages("pryr") install.packages("data.table") install.packages("openxlsx") install.packages("scales") install.packages("Quandl") install...
/DataIncubatorProject.R
no_license
marlesque/WeightAssignmentToStocks2
R
false
false
8,463
r
rm(list=ls()) install.packages("PerformanceAnalytics") install.packages("zoo") install.packages("quantmod") install.packages("lubridate") install.packages("plyr") install.packages("pryr") install.packages("data.table") install.packages("openxlsx") install.packages("scales") install.packages("Quandl") install...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iot_operations.R \name{iot_update_certificate} \alias{iot_update_certificate} \title{Updates the status of the specified certificate} \usage{ iot_update_certificate(certificateId, newStatus) } \arguments{ \item{certificateId}{[required] The I...
/cran/paws.internet.of.things/man/iot_update_certificate.Rd
permissive
jcheng5/paws
R
false
true
1,384
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iot_operations.R \name{iot_update_certificate} \alias{iot_update_certificate} \title{Updates the status of the specified certificate} \usage{ iot_update_certificate(certificateId, newStatus) } \arguments{ \item{certificateId}{[required] The I...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animalr.R \name{get_table_w_col} \alias{get_table_w_col} \title{Returns a character vector of tables names for the database connection conn where the tables contain a column matching a specific regular expression.} \usage{ get_table_w_col(con...
/man/get_table_w_col.Rd
permissive
rmsharp/animalr
R
false
true
948
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animalr.R \name{get_table_w_col} \alias{get_table_w_col} \title{Returns a character vector of tables names for the database connection conn where the tables contain a column matching a specific regular expression.} \usage{ get_table_w_col(con...
# setwd("/Users/masahiro/Documents/Brown Courses/Term 7/PHP2560/Japan") fShortenTweets <- function (tweets) { return(tweets[c("text","created_at","place_lat","place_lon","url")]) }
/02_Fall_2016/05_Twitter_Sentiment/fShortenTweets.R
no_license
ranjankislay/Final_Projects
R
false
false
183
r
# setwd("/Users/masahiro/Documents/Brown Courses/Term 7/PHP2560/Japan") fShortenTweets <- function (tweets) { return(tweets[c("text","created_at","place_lat","place_lon","url")]) }
testlist <- list(mu = 8.98211344139386e-321, var = 0) result <- do.call(metafolio:::est_beta_params,testlist) str(result)
/metafolio/inst/testfiles/est_beta_params/libFuzzer_est_beta_params/est_beta_params_valgrind_files/1612988069-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
121
r
testlist <- list(mu = 8.98211344139386e-321, var = 0) result <- do.call(metafolio:::est_beta_params,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{step3} \alias{step3} \title{Step 3 Optional. Run this option to apply the changes to label name or lable removal.} \usage{ step3() } \description{ Step 3 Optional. Run this option to apply the changes to label name or lable re...
/man/step3.Rd
no_license
leonpheng/xptdefine
R
false
true
366
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{step3} \alias{step3} \title{Step 3 Optional. Run this option to apply the changes to label name or lable removal.} \usage{ step3() } \description{ Step 3 Optional. Run this option to apply the changes to label name or lable re...
library(h2o) h2oServer <- h2o.init(max_mem_size="60g", nthreads=-1) dx_train <- h2o.importFile(h2oServer, path = "train-10m.csv") dx_test <- h2o.importFile(h2oServer, path = "test.csv") for (k in c("Month","DayofMonth","DayOfWeek")) { dx_train[[k]] <- as.factor(dx_train[[k]]) dx_test[[k]] <- as.factor(dx_test[[...
/1-linear/4-h2o-v3.R
no_license
ffyu/benchm-ml
R
false
false
604
r
library(h2o) h2oServer <- h2o.init(max_mem_size="60g", nthreads=-1) dx_train <- h2o.importFile(h2oServer, path = "train-10m.csv") dx_test <- h2o.importFile(h2oServer, path = "test.csv") for (k in c("Month","DayofMonth","DayOfWeek")) { dx_train[[k]] <- as.factor(dx_train[[k]]) dx_test[[k]] <- as.factor(dx_test[[...
library(causaldrf) ### Name: add_spl_est ### Title: The additive spline estimator ### Aliases: add_spl_est ### ** Examples ## Example from Schafer (2015). example_data <- sim_data add_spl_list <- add_spl_est(Y = Y, treat = T, treat_formula = T ~ B.1 + B.2 + B.3 + B.4 + B.5 + B.6 + B.7 + B.8,...
/data/genthat_extracted_code/causaldrf/examples/add_spl_est.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
967
r
library(causaldrf) ### Name: add_spl_est ### Title: The additive spline estimator ### Aliases: add_spl_est ### ** Examples ## Example from Schafer (2015). example_data <- sim_data add_spl_list <- add_spl_est(Y = Y, treat = T, treat_formula = T ~ B.1 + B.2 + B.3 + B.4 + B.5 + B.6 + B.7 + B.8,...
# # Aplicación web para la utilización del modelo creado para # predecir el numero de hijos en un hogar colombiano # # Autor: Alejandro Jimenez Franco # Técnicas en Aprendizaje Estadístico - Semestre 01 2021 # Universidad Nacional de Colombia # library(shiny) source("Modelo.R") ui <- fluidPage(title = "Predicción nú...
/web/app.R
no_license
juanescendales/TAE-01-NatalidadColombia
R
false
false
9,714
r
# # Aplicación web para la utilización del modelo creado para # predecir el numero de hijos en un hogar colombiano # # Autor: Alejandro Jimenez Franco # Técnicas en Aprendizaje Estadístico - Semestre 01 2021 # Universidad Nacional de Colombia # library(shiny) source("Modelo.R") ui <- fluidPage(title = "Predicción nú...
############################### # Subsetting and sorting # ############################### set.seed(13435) X <- data.frame("var1"=sample(1:5),"var2"=sample(6:10),"var3"=sample(11:15)) X <- X[sample(1:5),]; X$var2[c(1,3)]=NA # subset row and column X[,1] # return vector X[,"var1"] X[1:2,"var2"] # Logical X[(X$v...
/Class_3/class3_week3_lecture.R
no_license
ducdh1210/datasciencecoursera
R
false
false
6,011
r
############################### # Subsetting and sorting # ############################### set.seed(13435) X <- data.frame("var1"=sample(1:5),"var2"=sample(6:10),"var3"=sample(11:15)) X <- X[sample(1:5),]; X$var2[c(1,3)]=NA # subset row and column X[,1] # return vector X[,"var1"] X[1:2,"var2"] # Logical X[(X$v...
setwd( Sys.getenv( "RWD" ) ) machine_specific_replacements <- list( # replace the folder path on macnix c( 'path.expand( \"~\" ) , \"BSAPUF\"' , paste0( '"' , getwd() , '"' ) ) , # change other things in the script to be run c( "hello" , "howdy" ) ) source( lodown::syntaxtractor( "bsapuf" , repla...
/bsapuf-test.R
no_license
MonetDB/eanthony
R
false
false
400
r
setwd( Sys.getenv( "RWD" ) ) machine_specific_replacements <- list( # replace the folder path on macnix c( 'path.expand( \"~\" ) , \"BSAPUF\"' , paste0( '"' , getwd() , '"' ) ) , # change other things in the script to be run c( "hello" , "howdy" ) ) source( lodown::syntaxtractor( "bsapuf" , repla...
library(ggstatsplot) ### Name: numdf_summary ### Title: Compute minimum, maximum, and median across all numeric columns ### in a dataframe. ### Aliases: numdf_summary ### Keywords: internal ### ** Examples ## Not run: ##D ggstatsplot:::numdf_summary(ggplot2::msleep) ## End(Not run)
/data/genthat_extracted_code/ggstatsplot/examples/numdf_summary.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
294
r
library(ggstatsplot) ### Name: numdf_summary ### Title: Compute minimum, maximum, and median across all numeric columns ### in a dataframe. ### Aliases: numdf_summary ### Keywords: internal ### ** Examples ## Not run: ##D ggstatsplot:::numdf_summary(ggplot2::msleep) ## End(Not run)
#### internal transformation functions #### ### main # jac = d inv(x) / dx .d2r <- list( fun = function(x) .d2r_fun(x), inv = function(x) .r2d$fun(x), jac = function(x) 2 / (1 - x^2)^(3/2) ) .r2d <- list( fun = function(x) 2 * x/sqrt(1 - x^2), inv = function(x) .d2r$fun(x), jac = function(x) 4 / (x^2 + 4)...
/R/transformations-tools.R
no_license
FBartos/RoBMA
R
false
false
7,466
r
#### internal transformation functions #### ### main # jac = d inv(x) / dx .d2r <- list( fun = function(x) .d2r_fun(x), inv = function(x) .r2d$fun(x), jac = function(x) 2 / (1 - x^2)^(3/2) ) .r2d <- list( fun = function(x) 2 * x/sqrt(1 - x^2), inv = function(x) .d2r$fun(x), jac = function(x) 4 / (x^2 + 4)...
## This first line took over a minute in a Surface 3. if(!exists("NEI")){ NEI <- readRDS("./data/summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("./data/Source_Classification_Code.rds") } # QUESTION 3 # Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) ...
/Project2/plot3.R
no_license
hballinas/ExploratoryDataAnalysis
R
false
false
1,271
r
## This first line took over a minute in a Surface 3. if(!exists("NEI")){ NEI <- readRDS("./data/summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("./data/Source_Classification_Code.rds") } # QUESTION 3 # Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) ...
library(httr) library(devtools,lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3") library(twitteR) library(base64enc) #for encoding/decoding data library(rjson) #for converting to json library(ROAuth) api_key <- 'nlczeDhBe4m1WkmTWhGeWL9oS' api_secret <- 'AsDWSyzPCZuzx5DTW6XRJoYi8x8qR6kvI4rbWrcqAA7T6MuQGT' access_token <-...
/bamichae_p1_storejson.R
permissive
ub-cse442/election-and-data-sci
R
false
false
931
r
library(httr) library(devtools,lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3") library(twitteR) library(base64enc) #for encoding/decoding data library(rjson) #for converting to json library(ROAuth) api_key <- 'nlczeDhBe4m1WkmTWhGeWL9oS' api_secret <- 'AsDWSyzPCZuzx5DTW6XRJoYi8x8qR6kvI4rbWrcqAA7T6MuQGT' access_token <-...
#------------------------------------------------------------------------------ # Simulate 9 branches and 1 black box data set for testing branching model. #------------------------------------------------------------------------------ # Ryan N. Kinzer # Created: 9/23/2016 # Modified: 9/26/2016 #-----------------------...
/PatchOccupancy_Sims/Branch_Sim.R
no_license
KevinSee/LGR_SimulationStudy
R
false
false
3,657
r
#------------------------------------------------------------------------------ # Simulate 9 branches and 1 black box data set for testing branching model. #------------------------------------------------------------------------------ # Ryan N. Kinzer # Created: 9/23/2016 # Modified: 9/26/2016 #-----------------------...
#' Create explainer from your mlr model #' #' DALEX is designed to work with various black-box models like tree ensembles, linear models, neural networks etc. #' Unfortunately R packages that create such models are very inconsistent. Different tools use different interfaces to train, validate and use models. #' One...
/R/explain_mlr3.R
no_license
cran/DALEXtra
R
false
false
2,345
r
#' Create explainer from your mlr model #' #' DALEX is designed to work with various black-box models like tree ensembles, linear models, neural networks etc. #' Unfortunately R packages that create such models are very inconsistent. Different tools use different interfaces to train, validate and use models. #' One...
packages <- c("devtools", "dplyr", "foreign") if (length(setdiff(packages, rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } library(foreign) library(dplyr) temp <- tempfile() unzip("raw_data/SHR76_16.sav.zip", exdir="raw_data", overwrite=T) unlink(temp...
/scripts/import_murders.R
no_license
jwier85/murdermap
R
false
false
3,877
r
packages <- c("devtools", "dplyr", "foreign") if (length(setdiff(packages, rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } library(foreign) library(dplyr) temp <- tempfile() unzip("raw_data/SHR76_16.sav.zip", exdir="raw_data", overwrite=T) unlink(temp...
library(ggrepel) library(ggplot) library(dplyr) GET('https://pomber.github.io/covid19/timeseries.json', write_disk(tf <- tempfile(fileext = ".json"))) a <- fromJSON(tf) df <- bind_rows(a, .id = "Country") df$date <- as.Date(df$date) df$active <- df$confirmed - df$deaths - df$recovered df$diff <- c(0, diff...
/positiveCountries.R
no_license
JindrichSoukup/covid19
R
false
false
11,565
r
library(ggrepel) library(ggplot) library(dplyr) GET('https://pomber.github.io/covid19/timeseries.json', write_disk(tf <- tempfile(fileext = ".json"))) a <- fromJSON(tf) df <- bind_rows(a, .id = "Country") df$date <- as.Date(df$date) df$active <- df$confirmed - df$deaths - df$recovered df$diff <- c(0, diff...
################################################################################ # R script to handle a projection map (connections between EML2 and SEML1,2) # # Particular case of SEML1,2 to EML2: since there is no continuation procedure # available for this direction, do NOT use CONTINUATION.R if FWRK == "SEM" # ####...
/ProjMap/MAIN.R
no_license
lebihanbastien/RFTDA
R
false
false
13,422
r
################################################################################ # R script to handle a projection map (connections between EML2 and SEML1,2) # # Particular case of SEML1,2 to EML2: since there is no continuation procedure # available for this direction, do NOT use CONTINUATION.R if FWRK == "SEM" # ####...
# load library source("src/data.analyse/svm.classification.R") source("src/utils/common.R") source("src/utils/file.utils.R") library(caret) data.train <- read.csv("data/tuning/extreme/data.train.extreme.v3.csv", header=TRUE) data.test <- read.csv("data/tuning/extreme/data.test.extreme.v3.csv", header=TRUE) svm.rs.log <...
/src/extreme.classification/v3/svm.features.classification.R
no_license
tormlee/rainfalls-v2
R
false
false
4,394
r
# load library source("src/data.analyse/svm.classification.R") source("src/utils/common.R") source("src/utils/file.utils.R") library(caret) data.train <- read.csv("data/tuning/extreme/data.train.extreme.v3.csv", header=TRUE) data.test <- read.csv("data/tuning/extreme/data.test.extreme.v3.csv", header=TRUE) svm.rs.log <...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataLoadingSaving.R \name{loadCaseData} \alias{loadCaseData} \title{Load the case data from a folder} \usage{ loadCaseData(folder, readOnly = TRUE) } \arguments{ \item{folder}{The name of the folder containing the data.} \item{readOnly}{If t...
/man/loadCaseData.Rd
permissive
antithrombus/CaseControl
R
false
true
600
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataLoadingSaving.R \name{loadCaseData} \alias{loadCaseData} \title{Load the case data from a folder} \usage{ loadCaseData(folder, readOnly = TRUE) } \arguments{ \item{folder}{The name of the folder containing the data.} \item{readOnly}{If t...
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') test.rdocanomaly.golden <- function() { prosPath <- system.file("extdata", "prostate.csv", package="h2o") prostate.hex <- h2o.uploadFile(path = prosPath) prostate.dl <- h2o.deeplearning(x = 3:9, y = 2, training_frame = pros...
/h2o-r/tests/testdir_docexamples/runit_NOPASS_Rdoc_anomaly.R
permissive
datachand/h2o-3
R
false
false
490
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') test.rdocanomaly.golden <- function() { prosPath <- system.file("extdata", "prostate.csv", package="h2o") prostate.hex <- h2o.uploadFile(path = prosPath) prostate.dl <- h2o.deeplearning(x = 3:9, y = 2, training_frame = pros...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CreateFactorMaps4CA.R \name{createFactorMap} \alias{createFactorMap} \title{create the base plot maps for CA type graphs with \code{ggplot2}.} \usage{ createFactorMap( X, axis1 = 1, axis2 = 2, constraints = NULL, title = NULL, col...
/man/createFactorMap.Rd
no_license
HerveAbdi/PTCA4CATA
R
false
true
4,028
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CreateFactorMaps4CA.R \name{createFactorMap} \alias{createFactorMap} \title{create the base plot maps for CA type graphs with \code{ggplot2}.} \usage{ createFactorMap( X, axis1 = 1, axis2 = 2, constraints = NULL, title = NULL, col...
source('framework/data.R') source('framework/backtester.R') source('framework/processResults.R') source('framework/utilities.R') source('example_strategies.R') # load data dataList <- getData(directory="EXAMPLE") # choose strategy from example_strategies strategy <- "fixed" # check that the choice i...
/main.R
no_license
VindulaNR/bachteater-v5.5
R
false
false
825
r
source('framework/data.R') source('framework/backtester.R') source('framework/processResults.R') source('framework/utilities.R') source('example_strategies.R') # load data dataList <- getData(directory="EXAMPLE") # choose strategy from example_strategies strategy <- "fixed" # check that the choice i...
require(sqldf) require(lubridate) # function to read file get.data = function(){ # get file from web and store in my.temp my.temp = tempfile() my.url = "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(my.url, my.temp) # use sql query to extract releve...
/myAssignment/code/plot4.R
no_license
NickPTaylor/ExData_Plotting1
R
false
false
2,336
r
require(sqldf) require(lubridate) # function to read file get.data = function(){ # get file from web and store in my.temp my.temp = tempfile() my.url = "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(my.url, my.temp) # use sql query to extract releve...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mxnet_generated.R \name{mx.symbol.sign} \alias{mx.symbol.sign} \title{sign:Returns element-wise sign of the input.} \usage{ mx.symbol.sign(...) } \arguments{ \item{data}{NDArray-or-Symbol The input array.} \item{name}{string, optional Name o...
/Rsite/source/api/man/mx.symbol.sign.Rd
no_license
mli/new-docs
R
false
true
674
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mxnet_generated.R \name{mx.symbol.sign} \alias{mx.symbol.sign} \title{sign:Returns element-wise sign of the input.} \usage{ mx.symbol.sign(...) } \arguments{ \item{data}{NDArray-or-Symbol The input array.} \item{name}{string, optional Name o...
# # Slide code snippets # source('nyse-functions.R') require(lubridate) # load a file and get the schema df <- read_csv("sourceData/Stocks/gs.us.txt") head(df) # BIG VOlume on 5/4/1999, why? # Summary statistics summary(df) # max volume is huge, lets explore that ggplot(data = df) + aes(x =...
/week1/lecture-1.R
no_license
yerin-flora/AnomalyDetection
R
false
false
5,456
r
# # Slide code snippets # source('nyse-functions.R') require(lubridate) # load a file and get the schema df <- read_csv("sourceData/Stocks/gs.us.txt") head(df) # BIG VOlume on 5/4/1999, why? # Summary statistics summary(df) # max volume is huge, lets explore that ggplot(data = df) + aes(x =...
## library library(tidyverse) library(tidymodels) library(skimr) #### data load train <- read_csv('data/train.csv') test <- read_csv('data/test.csv') all_origin <- bind_rows(train, test) skim(all_origin) # PoolQC, Fence, Alley, MiscFeature, SaleType가 결측률이 높음 all_origin %>% select(-c(PoolQC, Fence, MiscFeature,...
/House_Pred_code_modeling.r
no_license
SangminJe/Kaggle_House_Price_Pred
R
false
false
759
r
## library library(tidyverse) library(tidymodels) library(skimr) #### data load train <- read_csv('data/train.csv') test <- read_csv('data/test.csv') all_origin <- bind_rows(train, test) skim(all_origin) # PoolQC, Fence, Alley, MiscFeature, SaleType가 결측률이 높음 all_origin %>% select(-c(PoolQC, Fence, MiscFeature,...
test_that("desktop() and user() work", { user_name <- user() path <- desktop() expect_true(is.character(user_name)) expect_true(is.character(path)) expect_length(user_name, 1) expect_length(path, 1) expect_true(grepl("desktop", path, ignore.case = TRUE)) expect_true(grepl(user_name, path, ig...
/tests/testthat/test-function-desktop.R
permissive
KWB-R/kwb.utils
R
false
false
474
r
test_that("desktop() and user() work", { user_name <- user() path <- desktop() expect_true(is.character(user_name)) expect_true(is.character(path)) expect_length(user_name, 1) expect_length(path, 1) expect_true(grepl("desktop", path, ignore.case = TRUE)) expect_true(grepl(user_name, path, ig...
library(iheatmapr) ### Name: add_col_signal ### Title: add_col_signal ### Aliases: add_col_signal add_col_signal,Iheatmap-method ### ** Examples mat <- matrix(rnorm(20), ncol = 5, nrow = 4) hm <- iheatmap(mat) %>% add_col_signal(signal = 1:5, name = "Strength") # Print heatmap if interactive session if (intera...
/data/genthat_extracted_code/iheatmapr/examples/add_col_signal.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
336
r
library(iheatmapr) ### Name: add_col_signal ### Title: add_col_signal ### Aliases: add_col_signal add_col_signal,Iheatmap-method ### ** Examples mat <- matrix(rnorm(20), ncol = 5, nrow = 4) hm <- iheatmap(mat) %>% add_col_signal(signal = 1:5, name = "Strength") # Print heatmap if interactive session if (intera...
#This file leads to the plot showing the differences in words that participants used to describe the different patterns packages <- c('tm','RColorBrewer', 'SnowballC', 'plyr', 'wordcloud', 'ggplot2', 'gridExtra', 'lsr', 'BayesFactor', 'stringr', 'ggsignif') lapply(packages, library, character.only = TRUE) dat<-read....
/code/wordanalysis.R
no_license
standardgalactic/function_communication
R
false
false
5,945
r
#This file leads to the plot showing the differences in words that participants used to describe the different patterns packages <- c('tm','RColorBrewer', 'SnowballC', 'plyr', 'wordcloud', 'ggplot2', 'gridExtra', 'lsr', 'BayesFactor', 'stringr', 'ggsignif') lapply(packages, library, character.only = TRUE) dat<-read....
## This function caches the matrix inversion computation ## The function ``makeCacheMatrix`` creates a specia matrix. It os a list contains functions to: ## 1. set the value of the matrix ## 2. get the value of the matrix ## 3. set the value of the matrix inversion ## 4. get the value of the matrix inversion makeCach...
/cachematrix.R
no_license
aymanabuelela/ProgrammingAssignment2
R
false
false
2,084
r
## This function caches the matrix inversion computation ## The function ``makeCacheMatrix`` creates a specia matrix. It os a list contains functions to: ## 1. set the value of the matrix ## 2. get the value of the matrix ## 3. set the value of the matrix inversion ## 4. get the value of the matrix inversion makeCach...
library(tidyverse) library(patchwork) results_files <- list.files(path = "segtetraploid_iso/", pattern = "csv") get_best_loglik <- function(input_file){ df <- read_csv(paste0("segtetraploid_iso/",input_file)) if(grepl('gbs', input_file, fixed = TRUE)){ df$Type <- "GBS" } else { df$Type <- "WGS" } return(df[o...
/inference/optimization/plot_segtetraploid_iso.R
no_license
pblischak/polyploid-demography
R
false
false
1,440
r
library(tidyverse) library(patchwork) results_files <- list.files(path = "segtetraploid_iso/", pattern = "csv") get_best_loglik <- function(input_file){ df <- read_csv(paste0("segtetraploid_iso/",input_file)) if(grepl('gbs', input_file, fixed = TRUE)){ df$Type <- "GBS" } else { df$Type <- "WGS" } return(df[o...
require(IKTrading) require(quantstrat) require(PerformanceAnalytics) initDate="1990-01-01" from="2003-01-01" to="2012-12-31" options(width=70) source("demoData.R") #trade sizing and initial equity settings tradeSize <- 100000 initEq <- tradeSize*length(symbols) strategy.st <- portfolio.st <- account.st <- "DollarVs...
/demo/atrDollarComparison.R
no_license
TheProfitcy/IKTrading
R
false
false
4,340
r
require(IKTrading) require(quantstrat) require(PerformanceAnalytics) initDate="1990-01-01" from="2003-01-01" to="2012-12-31" options(width=70) source("demoData.R") #trade sizing and initial equity settings tradeSize <- 100000 initEq <- tradeSize*length(symbols) strategy.st <- portfolio.st <- account.st <- "DollarVs...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cmtk.R \name{cmtk.dof2mat} \alias{cmtk.dof2mat} \title{Convert CMTK registration to homogeneous affine matrix with dof2mat} \usage{ cmtk.dof2mat(reg, Transpose = TRUE, version = FALSE) } \arguments{ \item{reg}{Path to input registration file ...
/man/cmtk.dof2mat.Rd
no_license
cran/nat
R
false
true
1,049
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cmtk.R \name{cmtk.dof2mat} \alias{cmtk.dof2mat} \title{Convert CMTK registration to homogeneous affine matrix with dof2mat} \usage{ cmtk.dof2mat(reg, Transpose = TRUE, version = FALSE) } \arguments{ \item{reg}{Path to input registration file ...
library(testthat) credential <- retrieve_credential_testing() update_expectation <- FALSE test_that("smoke test", { testthat::skip_on_cran() expect_message( returned_object <- REDCapR:::redcap_read_oneshot_eav(redcap_uri=credential$redcap_uri, token=credential$token) ) }) test_that("default", { testtha...
/tests/testthat/test-read-oneshot-eav.R
permissive
cran/REDCapR
R
false
false
12,860
r
library(testthat) credential <- retrieve_credential_testing() update_expectation <- FALSE test_that("smoke test", { testthat::skip_on_cran() expect_message( returned_object <- REDCapR:::redcap_read_oneshot_eav(redcap_uri=credential$redcap_uri, token=credential$token) ) }) test_that("default", { testtha...
#' @importFrom rappdirs user_cache_dir get_user_cache_dir <- function() { cdir <- Sys.getenv("R_PKG_CACHE_DIR", "") if (cdir == "") { cdir <- tryCatch( user_cache_dir("R-pkg"), error = function(e) { warning( "Cannot set package cache directory, using temporary directory. (", ...
/R/cache-dirs.R
permissive
QuLogic/pkgcache
R
false
false
650
r
#' @importFrom rappdirs user_cache_dir get_user_cache_dir <- function() { cdir <- Sys.getenv("R_PKG_CACHE_DIR", "") if (cdir == "") { cdir <- tryCatch( user_cache_dir("R-pkg"), error = function(e) { warning( "Cannot set package cache directory, using temporary directory. (", ...
#Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse #of a matrix rather than compute it repeatedly (there are also alternatives to matrix inversion that we #will not discuss here). Your assignment is to write a pair of functions that cache the inverse of a matrix. #...
/cachematrix.R
no_license
levanjan93/datasciencecoursera
R
false
false
1,185
r
#Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse #of a matrix rather than compute it repeatedly (there are also alternatives to matrix inversion that we #will not discuss here). Your assignment is to write a pair of functions that cache the inverse of a matrix. #...
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi rm(list=ls()) norm<-function(x){ sqrt(sum(x^2)) } N1<-100 N2<-100 P<-c(N1,N2)/(N1+N2) sigma2<-1 mu.1 <- c(-1,-2) mu.2<-c(2,5) X1<-cbind(rnorm(N1,mu.1[1],sqrt(sigma2)),rnorm(N1,mu.1[2],sqrt(sigma2))) X2<...
/inst/scripts/Linear/discri.R
no_license
gbonte/gbcode
R
false
false
741
r
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi rm(list=ls()) norm<-function(x){ sqrt(sum(x^2)) } N1<-100 N2<-100 P<-c(N1,N2)/(N1+N2) sigma2<-1 mu.1 <- c(-1,-2) mu.2<-c(2,5) X1<-cbind(rnorm(N1,mu.1[1],sqrt(sigma2)),rnorm(N1,mu.1[2],sqrt(sigma2))) X2<...