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 |
|---|---|---|---|---|---|---|---|---|---|
.onLoad <- function(libname, pkgname) {
if("pathview" %in% rownames(installed.packages())) {
data(gene.idtype.list, package ="pathview")
data(gene.idtype.bods, package ="pathview")
data(cpd.simtypes, package ="pathview")
# Added Nov 6th, 2017.
data(korg, package ="pathview")
# korg = try(read... | /R/zzz.R | no_license | samhinshaw/pathview | R | false | false | 1,234 | r | .onLoad <- function(libname, pkgname) {
if("pathview" %in% rownames(installed.packages())) {
data(gene.idtype.list, package ="pathview")
data(gene.idtype.bods, package ="pathview")
data(cpd.simtypes, package ="pathview")
# Added Nov 6th, 2017.
data(korg, package ="pathview")
# korg = try(read... |
#' Testing multiple SNPs simultaneously for GWAS
#'
#' @description This function performs SNP-set GWAS (genome-wide association studies),
#' which tests multiple SNPs (single nucleotide polymorphisms) simultaneously. The model of SNP-set GWAS is
#'
#' \deqn{y = X \beta + Q v + Z _ {c} u _ {c} + Z _ {r} u _ {r} + \ep... | /R/RGWAS.multisnp.R | permissive | quanrd/RAINBOWR | R | false | false | 30,627 | r | #' Testing multiple SNPs simultaneously for GWAS
#'
#' @description This function performs SNP-set GWAS (genome-wide association studies),
#' which tests multiple SNPs (single nucleotide polymorphisms) simultaneously. The model of SNP-set GWAS is
#'
#' \deqn{y = X \beta + Q v + Z _ {c} u _ {c} + Z _ {r} u _ {r} + \ep... |
source('AMS_597PJ/dhmm_sim.R')
source('AMS_597PJ/dhmm_estimate.R')
source('AMS_597PJ/dhmm_viterbi.R')
# inference hidden states sequence given a sequence of observations
dhmm.decoding <- function(obser, range = 5, max_iter) {
# range can only take one or two dim vector
bic <- NULL
model_list <- NULL
bes... | /project_materials/AMS_597PJ/dhmm_decoding.R | no_license | zkdxtt21/R-package-for-HMM | R | false | false | 1,651 | r |
source('AMS_597PJ/dhmm_sim.R')
source('AMS_597PJ/dhmm_estimate.R')
source('AMS_597PJ/dhmm_viterbi.R')
# inference hidden states sequence given a sequence of observations
dhmm.decoding <- function(obser, range = 5, max_iter) {
# range can only take one or two dim vector
bic <- NULL
model_list <- NULL
bes... |
##
## Two functions for creating and computing a matrix object which can cache its inverse
##
## makeCacheMatrix creates a special matrix object that can cache its inverse
##
## cacheSolve computes the inverse of the special matrix created by makeCacheMatrix.
## If the inverse has already been calculated and the mat... | /cachematrix.R | no_license | mctaggaa/ProgrammingAssignment2 | R | false | false | 1,839 | r | ##
## Two functions for creating and computing a matrix object which can cache its inverse
##
## makeCacheMatrix creates a special matrix object that can cache its inverse
##
## cacheSolve computes the inverse of the special matrix created by makeCacheMatrix.
## If the inverse has already been calculated and the mat... |
## Put comments here that give an overall description of what your
## functions do
## While working on a large matrix, computing inverse may be time consuming.
## If we are required to go through the same computations multiple times
## and the contents of the matrix are not changing, the value of inverse can be
## ca... | /cachematrix.R | no_license | pratik-mrp/ProgrammingAssignment2 | R | false | false | 1,837 | r | ## Put comments here that give an overall description of what your
## functions do
## While working on a large matrix, computing inverse may be time consuming.
## If we are required to go through the same computations multiple times
## and the contents of the matrix are not changing, the value of inverse can be
## ca... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merm.R
\name{graph2mx}
\alias{graph2mx}
\title{Convert a tree to a mapping matrix}
\usage{
graph2mx(td)
}
\arguments{
\item{td}{tree description in mermaid format}
}
\value{
the mapping matrix
}
\description{
Convert a tree description in mer... | /man/graph2mx.Rd | no_license | cran/irtrees | R | false | true | 418 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merm.R
\name{graph2mx}
\alias{graph2mx}
\title{Convert a tree to a mapping matrix}
\usage{
graph2mx(td)
}
\arguments{
\item{td}{tree description in mermaid format}
}
\value{
the mapping matrix
}
\description{
Convert a tree description in mer... |
##
# devtools::install_github("dkahle/ggmap")
names(clean_df)
ggplot(clean_df,aes(x=pickup_longitude,y=pickup_latitude))+
geom_point(size = 0.1,alpha=0.5) | /Draw Maps.R | no_license | jielulovesdessert/NYC-Taxi-Patterns | R | false | false | 156 | r | ##
# devtools::install_github("dkahle/ggmap")
names(clean_df)
ggplot(clean_df,aes(x=pickup_longitude,y=pickup_latitude))+
geom_point(size = 0.1,alpha=0.5) |
# Constructor for rendo.multilevel objects
# Does the steps shared between L2 and L3
#' @importFrom stats setNames
new_rendo_multilevel <- function(call, formula, num.levels, l.group.size, dt.model.data,
V, W, l.gmm, l.ovt, y, X){
# The list names in l.gmm determine the final nami... | /R/f_new_multilevel.R | no_license | mmeierer/REndo | R | false | false | 1,691 | r | # Constructor for rendo.multilevel objects
# Does the steps shared between L2 and L3
#' @importFrom stats setNames
new_rendo_multilevel <- function(call, formula, num.levels, l.group.size, dt.model.data,
V, W, l.gmm, l.ovt, y, X){
# The list names in l.gmm determine the final nami... |
7a7adefd7efbc2a63a7cfe4370658c04 dungeon_i25-m12-u3-v0.pddl_planlen=15.qdimacs 11239 101597 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Kronegger-Pfandler-Pichler/dungeon/dungeon_i25-m12-u3-v0.pddl_planlen=15/dungeon_i25-m12-u3-v0.pddl_planlen=15.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 91 | r | 7a7adefd7efbc2a63a7cfe4370658c04 dungeon_i25-m12-u3-v0.pddl_planlen=15.qdimacs 11239 101597 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/markdownHeader.R
\name{markdownHeader}
\alias{markdownHeader}
\alias{mdHeader}
\title{Markdown header}
\usage{
markdownHeader(text, level = 2L, tabset = FALSE, asis = FALSE)
}
\arguments{
\item{text}{\code{character(1)}.
Text.}
\item{level}{... | /man/markdownHeader.Rd | permissive | trichelab/basejump | R | false | true | 1,181 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/markdownHeader.R
\name{markdownHeader}
\alias{markdownHeader}
\alias{mdHeader}
\title{Markdown header}
\usage{
markdownHeader(text, level = 2L, tabset = FALSE, asis = FALSE)
}
\arguments{
\item{text}{\code{character(1)}.
Text.}
\item{level}{... |
# regional_mapping_project.R
#
# Functions specifically tailor to a regional mapping effort of black ash
#' Split a CFI plot id into constituent parts.
#'
#'
#' @param x A character vector, or for \code{extract_cfi_id} the name of a column
#' @param data The data containing the CFI column for \code{extract_cfi_id}
#'
... | /R/regional_mapping_project.R | no_license | jpshanno/jpshanno | R | false | false | 11,374 | r | # regional_mapping_project.R
#
# Functions specifically tailor to a regional mapping effort of black ash
#' Split a CFI plot id into constituent parts.
#'
#'
#' @param x A character vector, or for \code{extract_cfi_id} the name of a column
#' @param data The data containing the CFI column for \code{extract_cfi_id}
#'
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabr.R
\name{\%>\%}
\alias{\%>\%}
\title{Pipe}
\description{
The tabr package exports the the pipe operator, \code{\%>\%}, from magrittr just like dplyr.
}
| /man/pipe.Rd | permissive | areeves87/tabr | R | false | true | 234 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabr.R
\name{\%>\%}
\alias{\%>\%}
\title{Pipe}
\description{
The tabr package exports the the pipe operator, \code{\%>\%}, from magrittr just like dplyr.
}
|
library(mgpd)
### Name: ptgpd_psilog
### Title: internal
### Aliases: ptgpd_psilog
### Keywords: internal
### ** Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, y,... | /data/genthat_extracted_code/mgpd/examples/ptgpd_psilog.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,301 | r | library(mgpd)
### Name: ptgpd_psilog
### Title: internal
### Aliases: ptgpd_psilog
### Keywords: internal
### ** Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, y,... |
#' Example of a differential expression analysis generated with `DESeq2`.
#'
#' mRNA-seq profiling of iPS cells (4 euploid and 3 trisomy 21) derived from fibroblasts of monozygotic twins discordant for trisomy 21
#'
#' @format A data frame with 58336 rows and 6 variables:
#' @source \url{https://www.ncbi.nlm.nih.gov/ge... | /R/data.R | no_license | Ilarius/metaDEA | R | false | false | 1,632 | r | #' Example of a differential expression analysis generated with `DESeq2`.
#'
#' mRNA-seq profiling of iPS cells (4 euploid and 3 trisomy 21) derived from fibroblasts of monozygotic twins discordant for trisomy 21
#'
#' @format A data frame with 58336 rows and 6 variables:
#' @source \url{https://www.ncbi.nlm.nih.gov/ge... |
\name{plot_hierarchy_shape}
\alias{plot_hierarchy_shape}
\title{
Plots the shape of a dominance hierarchy from empirical data
}
\description{
This function takes a set of winners and losers from observed interactions and plots the probability of the dominant individual in an interaction winning given the difference in ... | /man/plot_hierarchy_shape.Rd | no_license | cran/aniDom | R | false | false | 2,125 | rd | \name{plot_hierarchy_shape}
\alias{plot_hierarchy_shape}
\title{
Plots the shape of a dominance hierarchy from empirical data
}
\description{
This function takes a set of winners and losers from observed interactions and plots the probability of the dominant individual in an interaction winning given the difference in ... |
library(geoR)
library(nlme)
install.packages('geoR', dependencies = TRUE)
install.packages('XQuartz', dependencies = TRUE)
attach(acid)
aciddep <- read.csv("~/Downloads/acid.dat", sep="")
# First things first!! Give it a quick EDA and look at it.
summary(aciddep[,3])
hist(aciddep[,3])
# To look at the data, as well... | /Spatial Regression.R | no_license | spalladino14/College-Code | R | false | false | 2,435 | r |
library(geoR)
library(nlme)
install.packages('geoR', dependencies = TRUE)
install.packages('XQuartz', dependencies = TRUE)
attach(acid)
aciddep <- read.csv("~/Downloads/acid.dat", sep="")
# First things first!! Give it a quick EDA and look at it.
summary(aciddep[,3])
hist(aciddep[,3])
# To look at the data, as well... |
#=============================================================================
#File: Fit resource utilization functions for Coreen's competition experiment
#=============================================================================
# This is R script to fit resource utilization cuves for Daphnia and
# Diaphanisoma... | /functions/resource_fitting.R | no_license | jusinowicz/coreen2020 | R | false | false | 15,293 | r | #=============================================================================
#File: Fit resource utilization functions for Coreen's competition experiment
#=============================================================================
# This is R script to fit resource utilization cuves for Daphnia and
# Diaphanisoma... |
print("This file was created within RStudio")
Print("And now it lives on GitHub")
| /Learning-3.Rproj | no_license | Sneha9499/Learning-3 | R | false | false | 83 | rproj | print("This file was created within RStudio")
Print("And now it lives on GitHub")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.corranalysis.R
\name{plot.corranalysis}
\alias{plot.corranalysis}
\title{Plots the correlation matrix and the correlation network from a 'corranalysis' object}
\usage{
\method{plot}{corranalysis}(x, horizontal = TRUE, title = NULL, ...)
... | /man/plot.corranalysis.Rd | no_license | sndmrc/BasketballAnalyzeR | R | false | true | 1,254 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.corranalysis.R
\name{plot.corranalysis}
\alias{plot.corranalysis}
\title{Plots the correlation matrix and the correlation network from a 'corranalysis' object}
\usage{
\method{plot}{corranalysis}(x, horizontal = TRUE, title = NULL, ...)
... |
train=read.csv("/Users/komaluntwal/Documents/NJIT 2021/spring 2021/CS636 data analytics with R/train_titanic.csv")
summary(train)
nrow(train)
ncol(train)
colnames(train)
head(train)
#Since Cabin has more than 70% of the data unknown , Using it will be pointless. Moreover with such less data , replacing with mean an... | /SurvivalPrediction/SurvivalPrediction_RandomForest.R | no_license | komal-untwal/Academic | R | false | false | 2,483 | r |
train=read.csv("/Users/komaluntwal/Documents/NJIT 2021/spring 2021/CS636 data analytics with R/train_titanic.csv")
summary(train)
nrow(train)
ncol(train)
colnames(train)
head(train)
#Since Cabin has more than 70% of the data unknown , Using it will be pointless. Moreover with such less data , replacing with mean an... |
#--------------------------------------------------------------------------------------------------
# UPDATE ORIGINAL TABLE
# we will update all table adding the Gordo Mills cell lines and moving fro 1520 row to
# 1744
#--------------------------------------------------------------------------------------------------
l... | /inst/extdata/update_cell_line_match_tab_all_with_mdaMills.R | no_license | CBIIT/rcellminerUtilsCDB | R | false | false | 745 | r | #--------------------------------------------------------------------------------------------------
# UPDATE ORIGINAL TABLE
# we will update all table adding the Gordo Mills cell lines and moving fro 1520 row to
# 1744
#--------------------------------------------------------------------------------------------------
l... |
#Belajar Bahasa R
# R Programming
phi = 3.14
r = 15
luas = phi*2*r
luas
| /coba.r | no_license | Aditpara20/r-belajar-r | R | false | false | 74 | r | #Belajar Bahasa R
# R Programming
phi = 3.14
r = 15
luas = phi*2*r
luas
|
#' Draw gradient arrows on a plot made with `mosaicCalc::contour_plot()`
#'
#' @param P The contour plot. Typically, you will pipe the `contour_plot()` command
#' into `draw_gradient()` and so you can ignore this argument: the piping process will fill
#' it in.
#' @param f the mathematical function of two inputs whose... | /R/draw_gradient.R | no_license | dtkaplan/math141Z | R | false | false | 1,738 | r | #' Draw gradient arrows on a plot made with `mosaicCalc::contour_plot()`
#'
#' @param P The contour plot. Typically, you will pipe the `contour_plot()` command
#' into `draw_gradient()` and so you can ignore this argument: the piping process will fill
#' it in.
#' @param f the mathematical function of two inputs whose... |
### JRI: http://rpubs.com/rossibarra/self_impute
SimSelfer <- function(size.array=20, het.error=0.7, hom.error=0.002, numloci=1000, rec=1.5, imiss=0.3){
### Simulate and Test
### imissing => individual missing rate,
### imiss > 1 will be sampled from a Beta(2,2) distribution (1- U-shaped)
### rec... | /lib/simulate_selfer.R | no_license | yangjl/phasing | R | false | false | 4,046 | r | ### JRI: http://rpubs.com/rossibarra/self_impute
SimSelfer <- function(size.array=20, het.error=0.7, hom.error=0.002, numloci=1000, rec=1.5, imiss=0.3){
### Simulate and Test
### imissing => individual missing rate,
### imiss > 1 will be sampled from a Beta(2,2) distribution (1- U-shaped)
### rec... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/coercion.r
\name{reclass_date}
\alias{reclass_date}
\title{Convenience method to reclass dates post-modification.}
\usage{
reclass_date(new, orig)
}
\description{
Convenience method to reclass dates post-modification.
}
\keyword{inter... | /man/reclass_date.Rd | no_license | gvanzin/lubridate | R | false | false | 326 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/coercion.r
\name{reclass_date}
\alias{reclass_date}
\title{Convenience method to reclass dates post-modification.}
\usage{
reclass_date(new, orig)
}
\description{
Convenience method to reclass dates post-modification.
}
\keyword{inter... |
#' QCAtools.
#'
#' @name QCAtools
#' @description Several convenience functions for QCA in R
#' @docType package
#' @importFrom QCAGUI eqmcc
#' @importFrom graphics plot
#' @import ggplot2
#' @import directlabels
#' @import stringr
NULL
| /QCAtools/R/QCAtools-package.r | no_license | ingted/R-Examples | R | false | false | 237 | r | #' QCAtools.
#'
#' @name QCAtools
#' @description Several convenience functions for QCA in R
#' @docType package
#' @importFrom QCAGUI eqmcc
#' @importFrom graphics plot
#' @import ggplot2
#' @import directlabels
#' @import stringr
NULL
|
setwd("Desktop")
#import data
EPCdata<-read.table("household_power_consumption.txt",
colClasses=c("character", "character","numeric",
"numeric","numeric","numeric",
"numeric","numeric","numeric"),
hea... | /figure/plot1.R | no_license | KasiaS/ExData_Plotting1 | R | false | false | 886 | r | setwd("Desktop")
#import data
EPCdata<-read.table("household_power_consumption.txt",
colClasses=c("character", "character","numeric",
"numeric","numeric","numeric",
"numeric","numeric","numeric"),
hea... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cut.integer.R
\name{cut.integer}
\alias{cut.integer}
\title{Convert integer vector to Factor}
\usage{
\method{cut}{integer}(x, ...)
}
\arguments{
\item{x}{integer vector}
\item{...}{further arguments passed to or from other methods}
}
\value... | /man/cut.integer.Rd | no_license | cran/rccmisc | R | false | true | 883 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cut.integer.R
\name{cut.integer}
\alias{cut.integer}
\title{Convert integer vector to Factor}
\usage{
\method{cut}{integer}(x, ...)
}
\arguments{
\item{x}{integer vector}
\item{...}{further arguments passed to or from other methods}
}
\value... |
# ==== DOCUMENTATION ====
#' Transfer function analysis of dynamic cerebral autoregulation (TFA)
#'
#' `TFA()` calculates dynamic cerebral autoregulation trough a transfer function analysis from a *continuous* recording. This function follows the recommendations from Claassen et al. \[1\] and mimicks the matlab sc... | /R/tfa.R | no_license | cran/clinmon | R | false | false | 13,997 | r | # ==== DOCUMENTATION ====
#' Transfer function analysis of dynamic cerebral autoregulation (TFA)
#'
#' `TFA()` calculates dynamic cerebral autoregulation trough a transfer function analysis from a *continuous* recording. This function follows the recommendations from Claassen et al. \[1\] and mimicks the matlab sc... |
# Load the Data Set
data <- read.table("household_power_consumption.txt", header = T, sep = ";", na.strings = "?")
# Subset it with the date
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
dataFull <- data[which(data$Date =="2007-02-01" | data$Date == "2007-02-02"), ]
timeFull <- paste(as.Date(dataFull$Date), da... | /plot3.R | no_license | augustohassel/Course-Project-1 | R | false | false | 951 | r | # Load the Data Set
data <- read.table("household_power_consumption.txt", header = T, sep = ";", na.strings = "?")
# Subset it with the date
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
dataFull <- data[which(data$Date =="2007-02-01" | data$Date == "2007-02-02"), ]
timeFull <- paste(as.Date(dataFull$Date), da... |
#!/usr/bin/Rscript
z<-c("Hello R world\n")
x<-c(12222.3344)
y<-sum(num1, num2)
retVal<-y
as.integer(retVal)
#retVal<-sum(num1, num2)
#return(as.integer(retVal))
#z<-c("Hello R world\n")
#x<-c(12222.3344)
#return(data<-c(as.integer(x)))
| /contrib/src/main/resources/r/anInt.R | permissive | rohanagrawal/aci | R | false | false | 239 | r | #!/usr/bin/Rscript
z<-c("Hello R world\n")
x<-c(12222.3344)
y<-sum(num1, num2)
retVal<-y
as.integer(retVal)
#retVal<-sum(num1, num2)
#return(as.integer(retVal))
#z<-c("Hello R world\n")
#x<-c(12222.3344)
#return(data<-c(as.integer(x)))
|
\name{rysgran-package}
\alias{rysgran-package}
\alias{rysgran}
\docType{package}
\title{Grain size analysis, textural classifications and distribution of unconsolidated sediments }
\description{ This package is a port to R of the SysGran program, written in Delphi by Camargo (2006). It contains functions for the anal... | /man/rysgran-package.Rd | no_license | mauricio-camargo/rysgran | R | false | false | 3,504 | rd | \name{rysgran-package}
\alias{rysgran-package}
\alias{rysgran}
\docType{package}
\title{Grain size analysis, textural classifications and distribution of unconsolidated sediments }
\description{ This package is a port to R of the SysGran program, written in Delphi by Camargo (2006). It contains functions for the anal... |
setwd("/home/jakub/CLionProjects/mownit/laboratory5")
library("ggplot2")
results = read.csv("resultlab3.csv")
show(results)
avg_results = aggregate(cbind(NAIVE, BETTER, GSL) ~ SIZE, data = results, FUN = mean)
show(avg_results)
avg_results$NAIVE_SD = aggregate(NAIVE ~ SIZE, data = results, FUN = sd)$NAIVE
avg_resu... | /laboratory05/laboratory5.R | no_license | jakubowiczish/mownit | R | false | false | 1,805 | r | setwd("/home/jakub/CLionProjects/mownit/laboratory5")
library("ggplot2")
results = read.csv("resultlab3.csv")
show(results)
avg_results = aggregate(cbind(NAIVE, BETTER, GSL) ~ SIZE, data = results, FUN = mean)
show(avg_results)
avg_results$NAIVE_SD = aggregate(NAIVE ~ SIZE, data = results, FUN = sd)$NAIVE
avg_resu... |
library(cultevo)
### Name: orderinsensitivedists
### Title: Calculate the bag-of-characters similarity between strings.
### Aliases: orderinsensitivedists
### ** Examples
orderinsensitivedists(c("xxxx", "asdf", "asd", "dsa"))
| /data/genthat_extracted_code/cultevo/examples/orderinsensitivedists.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 233 | r | library(cultevo)
### Name: orderinsensitivedists
### Title: Calculate the bag-of-characters similarity between strings.
### Aliases: orderinsensitivedists
### ** Examples
orderinsensitivedists(c("xxxx", "asdf", "asd", "dsa"))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HDC.R
\name{SSL}
\alias{SSL}
\title{Estimate causal effect assuming homogeneous treatment effect}
\usage{
SSL(nScans = 20000, burn = 10000, thin = 10, y, x, z, z_type = "binary",
lambda1 = 0.1, thetaA = 1, thetaB = 0.2 * dim(x)[2], lambda0 ... | /man/SSL.Rd | no_license | guhjy/HDconfounding | R | false | true | 3,142 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HDC.R
\name{SSL}
\alias{SSL}
\title{Estimate causal effect assuming homogeneous treatment effect}
\usage{
SSL(nScans = 20000, burn = 10000, thin = 10, y, x, z, z_type = "binary",
lambda1 = 0.1, thetaA = 1, thetaB = 0.2 * dim(x)[2], lambda0 ... |
library(MASS)
datafr = read.table('/Users/rosingle/Documents/theseAnalysis/20juin/output/dataAero/datafr_lent.txt',header = TRUE)
datafr.oral = datafr[datafr$partie=='oral',]
datafr1 = datafr[datafr$partie=='oral' & datafr$voyelle == 'ain',]
datafr2 = datafr[datafr$partie=='oral' & datafr$voyelle == 'an',]
datafr3 = d... | /scripts/statisticTest copy.R | no_license | xingyuliuNLP/NasalPedia | R | false | false | 1,977 | r | library(MASS)
datafr = read.table('/Users/rosingle/Documents/theseAnalysis/20juin/output/dataAero/datafr_lent.txt',header = TRUE)
datafr.oral = datafr[datafr$partie=='oral',]
datafr1 = datafr[datafr$partie=='oral' & datafr$voyelle == 'ain',]
datafr2 = datafr[datafr$partie=='oral' & datafr$voyelle == 'an',]
datafr3 = d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chldat.R
\docType{data}
\name{chldat}
\alias{chldat}
\title{Monthly chlorophyll time series for Hillsborough Bay}
\format{A data frame with 452 rows and 4 variables:
\describe{
\item{\code{date}}{Date}
\item{\code{res}}{numeric}
\item{\... | /man/chldat.Rd | no_license | fawda123/WRTDStidal | R | false | true | 957 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chldat.R
\docType{data}
\name{chldat}
\alias{chldat}
\title{Monthly chlorophyll time series for Hillsborough Bay}
\format{A data frame with 452 rows and 4 variables:
\describe{
\item{\code{date}}{Date}
\item{\code{res}}{numeric}
\item{\... |
library(ape)
testtree <- read.tree("11945_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="11945_0_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/11945_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("11945_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="11945_0_unrooted.txt") |
/04_Dataframes_R.R | no_license | BidartMG/R-Mas-Scripts-Practicas | R | false | false | 2,150 | r | ||
#============================================================================================================
#Appending the Answers back to the Test Data Set
#Creating Data Frame of multiple variable/column using Vector
#============================================================================================... | /Code/Recommendation_Evaluation.r | no_license | theivanai05/wls26092020 | R | false | false | 5,983 | r | #============================================================================================================
#Appending the Answers back to the Test Data Set
#Creating Data Frame of multiple variable/column using Vector
#============================================================================================... |
library(gglasso)
### Name: plot.gglasso
### Title: Plot solution paths from a "gglasso" object
### Aliases: plot.gglasso
### Keywords: models regression
### ** Examples
# load gglasso library
library(gglasso)
# load data set
data(bardet)
# define group index
group <- rep(1:20,each=5)
# fit group lasso
m1 <- ggla... | /data/genthat_extracted_code/gglasso/examples/plot.gglasso.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 600 | r | library(gglasso)
### Name: plot.gglasso
### Title: Plot solution paths from a "gglasso" object
### Aliases: plot.gglasso
### Keywords: models regression
### ** Examples
# load gglasso library
library(gglasso)
# load data set
data(bardet)
# define group index
group <- rep(1:20,each=5)
# fit group lasso
m1 <- ggla... |
doubleSpiral = setRefClass("doubleSpiral",
contains = "Dataset",
methods = list(
points = function() {
spiral_one = Spiral$new(700, 0.1, FALSE, 'spiral_one')
spiral_two = Spiral$new(700, 0.1, TRUE, 'spiral_two')
one_points = spiral_one$points()
two_points = spiral_two$points()
rbin... | /dataset/double_spiral.R | no_license | senhorinha/pattern-recognition | R | false | false | 358 | r | doubleSpiral = setRefClass("doubleSpiral",
contains = "Dataset",
methods = list(
points = function() {
spiral_one = Spiral$new(700, 0.1, FALSE, 'spiral_one')
spiral_two = Spiral$new(700, 0.1, TRUE, 'spiral_two')
one_points = spiral_one$points()
two_points = spiral_two$points()
rbin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frame.R
\name{as.h2o}
\alias{as.h2o}
\alias{as.h2o.default}
\alias{as.h2o.H2OFrame}
\alias{as.h2o.data.frame}
\alias{as.h2o.Matrix}
\title{Create H2OFrame}
\usage{
as.h2o(x, destination_frame = "", ...)
\method{as.h2o}{default}(x, destinatio... | /man/as.h2o.Rd | no_license | Libardo1/h2o | R | false | true | 1,942 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frame.R
\name{as.h2o}
\alias{as.h2o}
\alias{as.h2o.default}
\alias{as.h2o.H2OFrame}
\alias{as.h2o.data.frame}
\alias{as.h2o.Matrix}
\title{Create H2OFrame}
\usage{
as.h2o(x, destination_frame = "", ...)
\method{as.h2o}{default}(x, destinatio... |
library(data.table)
allf <- sub('.mat','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/simu/result/impute/dca'))
getf <- sub('.rds','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/simu/result/procimpute/dca'))
runf <- setdiff(allf, getf)
res <- lapply(runf,function(f) {
if (!f%... | /simu/code/procimpute/dca.R | no_license | wangdi2016/imputationBenchmark | R | false | false | 706 | r | library(data.table)
allf <- sub('.mat','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/simu/result/impute/dca'))
getf <- sub('.rds','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/simu/result/procimpute/dca'))
runf <- setdiff(allf, getf)
res <- lapply(runf,function(f) {
if (!f%... |
recluster.plot.pie<-function(long, lat, mat=NULL, distance=NULL, loc=NULL, areas=NULL, square=2,map=NULL,add=FALSE,minsize=NULL,proportional=T,xlim=NULL,ylim=NULL,main=NULL,xlab=NULL,ylab=NULL,...){
if(is.null(mat) & is.null(distance)){
stop("A distance matrix or a colour matrix from recluster.col must be provide... | /R/recluster.plot.pie.R | no_license | cran/recluster | R | false | false | 2,351 | r | recluster.plot.pie<-function(long, lat, mat=NULL, distance=NULL, loc=NULL, areas=NULL, square=2,map=NULL,add=FALSE,minsize=NULL,proportional=T,xlim=NULL,ylim=NULL,main=NULL,xlab=NULL,ylab=NULL,...){
if(is.null(mat) & is.null(distance)){
stop("A distance matrix or a colour matrix from recluster.col must be provide... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Visualization.R
\name{visualizeFeature}
\alias{visualizeFeature}
\title{Visualize Longitudinal Feature}
\usage{
visualizeFeature(df, text, group.levels, unit = "days",
ylabel = "Normalized Count", col = c("blue", "firebrick"),
prefix = "T... | /man/visualizeFeature.Rd | permissive | sjanssen2/MetaLonDA | R | false | true | 1,368 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Visualization.R
\name{visualizeFeature}
\alias{visualizeFeature}
\title{Visualize Longitudinal Feature}
\usage{
visualizeFeature(df, text, group.levels, unit = "days",
ylabel = "Normalized Count", col = c("blue", "firebrick"),
prefix = "T... |
library(xgboost)
library(tidyverse)
library(mlr)
library(rpart)
library(rpart.plot)
#get the model, tuning parameters & the training data first
xgmodel = readRDS(paste0(path, "results/xgboost_model.rds"))
training_data = readRDS(paste0(path, "results/training_data.rds"))
tuning_result <- readRDS(paste0(path, "results/... | /outlier_detection.R | no_license | adamolko/iml | R | false | false | 5,791 | r | library(xgboost)
library(tidyverse)
library(mlr)
library(rpart)
library(rpart.plot)
#get the model, tuning parameters & the training data first
xgmodel = readRDS(paste0(path, "results/xgboost_model.rds"))
training_data = readRDS(paste0(path, "results/training_data.rds"))
tuning_result <- readRDS(paste0(path, "results/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Indic.R
\docType{data}
\name{Indic}
\alias{Indic}
\title{Example dataset of indicator values}
\format{A data frame with 33 rows and 6 columns:
\describe{
\item{IndicatorID}{Numerical ID of indicators}
\item{Indicator_name}{Character names... | /man/Indic.Rd | no_license | NINAnor/NIcalcExtra | R | false | true | 760 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Indic.R
\docType{data}
\name{Indic}
\alias{Indic}
\title{Example dataset of indicator values}
\format{A data frame with 33 rows and 6 columns:
\describe{
\item{IndicatorID}{Numerical ID of indicators}
\item{Indicator_name}{Character names... |
### Updated analysis for identifying KOs that peak at the same time
### across taxa with diel expression of that KO
## Setting up necessary functions
## Calculating the circular distance between two peak times
calculate_med_dist<-function(pair){
difference<-abs(pair[1]-pair[2])
return(min(difference,6-difference))... | /scripts/peak_time_distribution_simulations.R | no_license | dmuratore/community_scale_metabolism_NPSG | R | false | false | 22,527 | r | ### Updated analysis for identifying KOs that peak at the same time
### across taxa with diel expression of that KO
## Setting up necessary functions
## Calculating the circular distance between two peak times
calculate_med_dist<-function(pair){
difference<-abs(pair[1]-pair[2])
return(min(difference,6-difference))... |
### Read txt files
library(dplyr)
reviewpath <- "~/bridges/2016del"
completepath <- list.files(reviewpath, pattern = "*.TXT$", full.names = TRUE)
### Read data
read.txt <- function(x) {
awful.table <- read.table(x, header = FALSE, sep = ",", quote = "",
na.strings = "", fill = TRUE, ... | /bridges.R | no_license | MadStats/bridges-Vesna0130 | R | false | false | 1,311 | r | ### Read txt files
library(dplyr)
reviewpath <- "~/bridges/2016del"
completepath <- list.files(reviewpath, pattern = "*.TXT$", full.names = TRUE)
### Read data
read.txt <- function(x) {
awful.table <- read.table(x, header = FALSE, sep = ",", quote = "",
na.strings = "", fill = TRUE, ... |
## With these functions you are able to cache the potentially time-consuming computations of inverse matrices.
## The function makeCacheMatrix creates a special 'matrix',
## which is really a list of functions:
## set - set the value of the matrix
## get - get the value of the matrix
## setinv - set the value of the... | /cachematrix.R | no_license | FrieseWoudloper/CourseraRProgramming | R | false | false | 1,190 | r | ## With these functions you are able to cache the potentially time-consuming computations of inverse matrices.
## The function makeCacheMatrix creates a special 'matrix',
## which is really a list of functions:
## set - set the value of the matrix
## get - get the value of the matrix
## setinv - set the value of the... |
########################################################################################
## Description:
# Analysis - External scanner and external pathology laboratory - Test set 5
# Author Henrik Olsson
########################################################################################
rm(list=ls())
library(... | /analysis/stavanger.R | no_license | heolss/Conformal_analyses | R | false | false | 3,838 | r | ########################################################################################
## Description:
# Analysis - External scanner and external pathology laboratory - Test set 5
# Author Henrik Olsson
########################################################################################
rm(list=ls())
library(... |
context("Xy Testing")
# REGRESSION / CLASSIFICATION ---------------------------------------------
test_that("Standard Case", {
require(data.table)
unit <- Xy()
expect_that(unit, is_a("Xy_sim"))
expect_that(unit$data, is_a("data.table"))
expect_that(unit$tgp, is_a("character"))
expect_that(unit$control... | /tests/testthat/test.Xy.R | no_license | waith/Xy | R | false | false | 4,168 | r | context("Xy Testing")
# REGRESSION / CLASSIFICATION ---------------------------------------------
test_that("Standard Case", {
require(data.table)
unit <- Xy()
expect_that(unit, is_a("Xy_sim"))
expect_that(unit$data, is_a("data.table"))
expect_that(unit$tgp, is_a("character"))
expect_that(unit$control... |
#Random Forest Assignment
read.csv("/Users/amandeep/Downloads/customer_churn.csv", stringsAsFactors = T) -> customers
names(customers)
library(caTools)
sample.split(customers$gender,SplitRatio = 0.65)-> split_tag
table(split_tag)
subset(customers,split_tag==TRUE) -> training
nrow(training)
subset(customers,split_tag==F... | /RandomForestAssignment.R | no_license | amandeepsinghjagde/RWork | R | false | false | 1,066 | r | #Random Forest Assignment
read.csv("/Users/amandeep/Downloads/customer_churn.csv", stringsAsFactors = T) -> customers
names(customers)
library(caTools)
sample.split(customers$gender,SplitRatio = 0.65)-> split_tag
table(split_tag)
subset(customers,split_tag==TRUE) -> training
nrow(training)
subset(customers,split_tag==F... |
## Dale W.R. Rosenthal, 2018
## You are free to distribute and use this code so long as you attribute
## it to me or cite the text.
## The legal disclaimer in _A Quantitative Primer on Investments with R_
## applies to this code. Use or distribution without these comment lines
## is forbidden.
library(xts)
library(Qua... | /rain/hw1/ch2-exercises.r | no_license | chicago-joe/RScripts | R | false | false | 3,370 | r | ## Dale W.R. Rosenthal, 2018
## You are free to distribute and use this code so long as you attribute
## it to me or cite the text.
## The legal disclaimer in _A Quantitative Primer on Investments with R_
## applies to this code. Use or distribution without these comment lines
## is forbidden.
library(xts)
library(Qua... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generic_methods.R
\docType{methods}
\name{seqplots-generic}
\alias{[,PlotSetArray,ANY,missing,ANY-method}
\alias{[,PlotSetArray,ANY,vector,ANY-method}
\alias{[,PlotSetList,ANY,ANY,ANY-method}
\alias{[[,PlotSetArray,ANY,ANY-method}
\alias{[[,P... | /script/mcclintock_analysis_code/seqplots-master/man/seqplots-generic.Rd | no_license | Intro-Sci-Comp-UIowa/biol-4386-project-pfothergill | R | false | true | 3,188 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generic_methods.R
\docType{methods}
\name{seqplots-generic}
\alias{[,PlotSetArray,ANY,missing,ANY-method}
\alias{[,PlotSetArray,ANY,vector,ANY-method}
\alias{[,PlotSetList,ANY,ANY,ANY-method}
\alias{[[,PlotSetArray,ANY,ANY-method}
\alias{[[,P... |
\alias{gtk-GtkPaperSize}
\alias{GtkPaperSize}
\alias{GtkUnit}
\name{gtk-GtkPaperSize}
\title{GtkPaperSize}
\description{Support for named paper sizes}
\section{Methods and Functions}{
\code{\link{gtkPaperSizeNew}(name = NULL)}\cr
\code{\link{gtkPaperSizeNewFromPpd}(ppd.name, ppd.display.name, width, height)}\cr
\code{\... | /man/gtk-GtkPaperSize.Rd | no_license | cran/RGtk2.10 | R | false | false | 2,284 | rd | \alias{gtk-GtkPaperSize}
\alias{GtkPaperSize}
\alias{GtkUnit}
\name{gtk-GtkPaperSize}
\title{GtkPaperSize}
\description{Support for named paper sizes}
\section{Methods and Functions}{
\code{\link{gtkPaperSizeNew}(name = NULL)}\cr
\code{\link{gtkPaperSizeNewFromPpd}(ppd.name, ppd.display.name, width, height)}\cr
\code{\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estim_reweighted.R
\name{est_ipw}
\alias{est_ipw}
\title{Inverse probability weighted (IPW) estimator}
\usage{
est_ipw(data, delta, g_learners, e_learners, w_names, z_names, ...)
}
\arguments{
\item{data}{A \code{data.table} containing the ob... | /man/est_ipw.Rd | permissive | nhejazi/medshift | R | false | true | 2,106 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estim_reweighted.R
\name{est_ipw}
\alias{est_ipw}
\title{Inverse probability weighted (IPW) estimator}
\usage{
est_ipw(data, delta, g_learners, e_learners, w_names, z_names, ...)
}
\arguments{
\item{data}{A \code{data.table} containing the ob... |
library(rhosp)
### Name: adequadExp
### Title: test the adequation of a random variable to the exponential
### distribution
### Aliases: adequadExp
### Keywords: htest
### ** Examples
## Not run:
##D T <- c(12.9622796, 1.4146460, 1.3146761, 14.9147353, 7.5131105,
##D 8.5130874, 6.5943351, 10.6954653, 14.100... | /data/genthat_extracted_code/rhosp/examples/adequadExp.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 457 | r | library(rhosp)
### Name: adequadExp
### Title: test the adequation of a random variable to the exponential
### distribution
### Aliases: adequadExp
### Keywords: htest
### ** Examples
## Not run:
##D T <- c(12.9622796, 1.4146460, 1.3146761, 14.9147353, 7.5131105,
##D 8.5130874, 6.5943351, 10.6954653, 14.100... |
# Функция для отображения угла, записанного в десятичной форме, в градусной мере
show_in_the_degree_system = function(x) {
degrees = as.integer(x)
print(degrees)
minutes = (x - degrees) * 60
print(as.integer(minutes))
seconds = (minutes - as.integer(minutes)) * 60
... | /IV (Определение азимута земного предмета по Солнцу)/IV (Мои данные с подгонкой).R | permissive | paveloom-university/Astrometric-Workshop-Summer-2019 | R | false | false | 19,048 | r | # Функция для отображения угла, записанного в десятичной форме, в градусной мере
show_in_the_degree_system = function(x) {
degrees = as.integer(x)
print(degrees)
minutes = (x - degrees) * 60
print(as.integer(minutes))
seconds = (minutes - as.integer(minutes)) * 60
... |
library(tidyverse) # We need ggplot (for viz) and dplyr (for data wrangling)
library(dplyr)
library(mongolite) # Simple MongoDB client
library(zoo) # Provides a rolling mean function we will use in the viz
# Connect to MongoDB
conn <- mongo(
collection = 'postings',
db = 'aggregate',
url = 'mong... | /noBreakAnalysis.R | no_license | graphicsdesk/covid-jobs | R | false | false | 9,220 | r |
library(tidyverse) # We need ggplot (for viz) and dplyr (for data wrangling)
library(dplyr)
library(mongolite) # Simple MongoDB client
library(zoo) # Provides a rolling mean function we will use in the viz
# Connect to MongoDB
conn <- mongo(
collection = 'postings',
db = 'aggregate',
url = 'mong... |
library(cricketr)
### Name: batsmanRunsPredict
### Title: Predict the runs for the batsman given the Balls Faced and
### Minutes in crease
### Aliases: batsmanRunsPredict
### Keywords: ~kwd1 ~kwd2
### ** Examples
# Get or use the <batsman>.csv obtained with getPlayerData()
# tendulkar <- getPlayerData(35320,file=... | /data/genthat_extracted_code/cricketr/examples/batsmanRunsPredict.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,120 | r | library(cricketr)
### Name: batsmanRunsPredict
### Title: Predict the runs for the batsman given the Balls Faced and
### Minutes in crease
### Aliases: batsmanRunsPredict
### Keywords: ~kwd1 ~kwd2
### ** Examples
# Get or use the <batsman>.csv obtained with getPlayerData()
# tendulkar <- getPlayerData(35320,file=... |
`distance_w` <-
function(net, directed = NULL, gconly = TRUE, subsample = 1, seed = NULL){
# Check whether confirms to tnet standard
if (is.null(attributes(net)$tnet))
net <- as.tnet(net, type = "weighted one-mode tnet")
if (attributes(net)$tnet != "weighted one-mode tnet")
stop("Network not loaded prop... | /output/sources/authors/258/bipartite/distance_w.R | no_license | Irbis3/crantasticScrapper | R | false | false | 1,160 | r | `distance_w` <-
function(net, directed = NULL, gconly = TRUE, subsample = 1, seed = NULL){
# Check whether confirms to tnet standard
if (is.null(attributes(net)$tnet))
net <- as.tnet(net, type = "weighted one-mode tnet")
if (attributes(net)$tnet != "weighted one-mode tnet")
stop("Network not loaded prop... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/somaticSignature-addTriNucleotideDistribution.R
\name{addTriNucleotideDistribution}
\alias{addTriNucleotideDistribution}
\title{Add trinucleotide distribution annotations}
\usage{
addTriNucleotideDistribution(dat)
}
\arguments{
\item{dat}{red... | /man/addTriNucleotideDistribution.Rd | permissive | nalomran/CNCDriver | R | false | true | 980 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/somaticSignature-addTriNucleotideDistribution.R
\name{addTriNucleotideDistribution}
\alias{addTriNucleotideDistribution}
\title{Add trinucleotide distribution annotations}
\usage{
addTriNucleotideDistribution(dat)
}
\arguments{
\item{dat}{red... |
#functions providng various diagnostics for evaluating model assumptions and stability and
#for helping with setting an appropriate random slopes structure for (G)LMMs
#written by Roger Mundry, last modified early 2016
ranef.diagn.plot<-function(model.res, QQ=F, col=grey(0.5, alpha=0.75)){
old.par = par(no.readonly =... | /functions/diagnostic_fcns.r | no_license | cvoelter/dog_animacy_perception | R | false | false | 35,502 | r | #functions providng various diagnostics for evaluating model assumptions and stability and
#for helping with setting an appropriate random slopes structure for (G)LMMs
#written by Roger Mundry, last modified early 2016
ranef.diagn.plot<-function(model.res, QQ=F, col=grey(0.5, alpha=0.75)){
old.par = par(no.readonly =... |
\name{loadings.boots}
\alias{loadings.boots}
\title{BCa Summaries for the loadings of an mvdareg object}
\description{Computes bootstrap BCa confidence intervals for the loadings, along with expanded bootstrap summaries.}
\usage{
loadings.boots(object, ncomp = object$ncomp, conf = .95)
}
\arguments{
\item{object}{ an o... | /man/loadings.boots.Rd | no_license | cwmiller21/mvdalab | R | false | false | 2,036 | rd | \name{loadings.boots}
\alias{loadings.boots}
\title{BCa Summaries for the loadings of an mvdareg object}
\description{Computes bootstrap BCa confidence intervals for the loadings, along with expanded bootstrap summaries.}
\usage{
loadings.boots(object, ncomp = object$ncomp, conf = .95)
}
\arguments{
\item{object}{ an o... |
setwd("~/Desktop/sfei")
load(file="perStation.Rda")
allData<-read.csv("allData.csv")
require(lubridate)
head(perStation[[1]]$Date,20) ## looks like 1-14, 15-on would be a safe break
perStation[[1]]$month=month(perStation[[1]]$Date)
table(perStation[[1]]$month) ## more than once a month in April through October
leng... | /SFEI_chl/exploration/setupVolumetricFlow.R | no_license | sastoudt/DS421_summerProject | R | false | false | 5,338 | r | setwd("~/Desktop/sfei")
load(file="perStation.Rda")
allData<-read.csv("allData.csv")
require(lubridate)
head(perStation[[1]]$Date,20) ## looks like 1-14, 15-on would be a safe break
perStation[[1]]$month=month(perStation[[1]]$Date)
table(perStation[[1]]$month) ## more than once a month in April through October
leng... |
#### SETTING UP A COHORT DIAGNOSTICS PACKAGE
# I assume that you have taken the example package folder from
# https://github.com/OHDSI/CohortDiagnostics/tree/master/examplePackage
# and followed the instructions to rename it etc
# and now you have reached the part where you want to add your cohort definitions from... | /AWS cohort diagnostics/AWS insert cohort definitions.R | no_license | edward-burn/OhdsiCodeSnippets | R | false | false | 16,085 | r | #### SETTING UP A COHORT DIAGNOSTICS PACKAGE
# I assume that you have taken the example package folder from
# https://github.com/OHDSI/CohortDiagnostics/tree/master/examplePackage
# and followed the instructions to rename it etc
# and now you have reached the part where you want to add your cohort definitions from... |
\name{compareMetaCVwithBlast}
\alias{compareMetaCVwithBlast}
\title{find similarities between Blast and MetaCV results}
\usage{
compareMetaCVwithBlast(taxonomyReportDB, metaCVReport)
}
\arguments{
\item{taxonomyReportDB}{}
\item{metaCVReport}{}
\item{taxonDB}{connection to taxonomy DB}
}
\value{
data.frame
}
\d... | /man/compareMetaCVwithBlast.Rd | no_license | psikon/metaR | R | false | false | 481 | rd | \name{compareMetaCVwithBlast}
\alias{compareMetaCVwithBlast}
\title{find similarities between Blast and MetaCV results}
\usage{
compareMetaCVwithBlast(taxonomyReportDB, metaCVReport)
}
\arguments{
\item{taxonomyReportDB}{}
\item{metaCVReport}{}
\item{taxonDB}{connection to taxonomy DB}
}
\value{
data.frame
}
\d... |
extract.verb <- function(r){
wrds <- unnest_tokens(r[c("President","fulltext")],wrds,fulltext)$wrds
used.verbs <- intersect(action.verbs,wrds) # find verbs used in speeches
times <- rep(NA,length(used.verbs))
for(i in 1:length(used.verbs)){
times[i] <- sum(wrds==used.verbs[i]) # count the times of each verb... | /libs/extract.verb.R | no_license | lanceyjt/American-President-Inauguration-Analysis | R | false | false | 463 | r | extract.verb <- function(r){
wrds <- unnest_tokens(r[c("President","fulltext")],wrds,fulltext)$wrds
used.verbs <- intersect(action.verbs,wrds) # find verbs used in speeches
times <- rep(NA,length(used.verbs))
for(i in 1:length(used.verbs)){
times[i] <- sum(wrds==used.verbs[i]) # count the times of each verb... |
#' @title peak_agregation
#'
#' @description
#' \code{peak_agregation} is the function that agregates tiles from the smudge_container
#' into smudges - individual distributions
#'
#' @param .smudge_container - a smudge_container object; a list with `x`,`y` axies of the 2d histogram and `dens` matrix of 2h histogram val... | /R/peak_agregation.R | permissive | KamilSJaron/smudgeplot | R | false | false | 2,036 | r | #' @title peak_agregation
#'
#' @description
#' \code{peak_agregation} is the function that agregates tiles from the smudge_container
#' into smudges - individual distributions
#'
#' @param .smudge_container - a smudge_container object; a list with `x`,`y` axies of the 2d histogram and `dens` matrix of 2h histogram val... |
## ggplot2 (part 1)
library(ggplot2)
## ggplot2 (part 2)
str(mpg)
## ggplot2 "Hello, world!"
library(ggplot2)
qplot(displ,hwy,data=mpg)
## Modifying aesthetics
qplot(displ,hwy,data=mpg,color=drv)
## Adding a geom
qplot(displ,hwy,data=mpg,geom=c("point","smooth"))
## Histograms
qplot(hwy,data=mpg,fill=drv)
... | /4 - Exploratory Data Analysis/ggplot2.R | no_license | kiostra/Data-Science | R | false | false | 1,707 | r | ## ggplot2 (part 1)
library(ggplot2)
## ggplot2 (part 2)
str(mpg)
## ggplot2 "Hello, world!"
library(ggplot2)
qplot(displ,hwy,data=mpg)
## Modifying aesthetics
qplot(displ,hwy,data=mpg,color=drv)
## Adding a geom
qplot(displ,hwy,data=mpg,geom=c("point","smooth"))
## Histograms
qplot(hwy,data=mpg,fill=drv)
... |
###########################################################################################################
#
# BS820 R Code: Lecture 14 Code
# Description: Repeated Events
# Dataset:
# created: 12/20/2020
#
############################################################################################################
#... | /R/141_BS820_class14.R | no_license | a-chernofsky/BS820-RCode | R | false | false | 4,488 | r | ###########################################################################################################
#
# BS820 R Code: Lecture 14 Code
# Description: Repeated Events
# Dataset:
# created: 12/20/2020
#
############################################################################################################
#... |
\name{MCMCtNARCH}
\alias{mctnarch}
\alias{plotpara}
\alias{aus2005}
\title{MCMC estimation of Box-Cox transformed nonlinear GARCH (1, 1) model with Student-t Distribution }
\description{
\code{MCMCtNARCH} will perform a MCMC estimation of Box-Cox transformed nonlinear GARCH (1, 1) model with Student-t Distributio... | /man/mcmctnarch.Rd | no_license | cran/MCMCtNARCH | R | false | false | 1,445 | rd | \name{MCMCtNARCH}
\alias{mctnarch}
\alias{plotpara}
\alias{aus2005}
\title{MCMC estimation of Box-Cox transformed nonlinear GARCH (1, 1) model with Student-t Distribution }
\description{
\code{MCMCtNARCH} will perform a MCMC estimation of Box-Cox transformed nonlinear GARCH (1, 1) model with Student-t Distributio... |
# R.E. Benestad, Heathrow 25.02.2005
# 10.7 cm flux: http://www.drao.nrc.ca/icarus/www/maver.txt
f10.7cm <- function(url="http://lasp.colorado.edu/lisird/tss/noaa_radio_flux.csv?",plot=TRUE,na.rm=TRUE) {
# old: ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/Penticton_Adjusted/daily/DAILYPLT.ADJ
# old... | /R/scl.R | no_license | brasmus/replicationDemos | R | false | false | 20,584 | r | # R.E. Benestad, Heathrow 25.02.2005
# 10.7 cm flux: http://www.drao.nrc.ca/icarus/www/maver.txt
f10.7cm <- function(url="http://lasp.colorado.edu/lisird/tss/noaa_radio_flux.csv?",plot=TRUE,na.rm=TRUE) {
# old: ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/Penticton_Adjusted/daily/DAILYPLT.ADJ
# old... |
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Ctrl + Shift + B'
# Check Package: ... | /R/hello.R | no_license | KJayantKumar/PredictCustScore | R | false | false | 452 | r | # Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Ctrl + Shift + B'
# Check Package: ... |
.__LINTERS__. <- new.env(parent = emptyenv())
##' Add a Linter
##'
##' Add a linter, to be used in subsequent calls to [lint()].
##'
##' @param name The name of the linter, as a string.
##' @param linter A [linter()].
##' @export
##' @example examples/example-linter.R
addLinter <- function(name, linter) {
assign(nam... | /R/lint-framework.R | no_license | RamChandraTeja/rsconnect | R | false | false | 9,708 | r | .__LINTERS__. <- new.env(parent = emptyenv())
##' Add a Linter
##'
##' Add a linter, to be used in subsequent calls to [lint()].
##'
##' @param name The name of the linter, as a string.
##' @param linter A [linter()].
##' @export
##' @example examples/example-linter.R
addLinter <- function(name, linter) {
assign(nam... |
# The American Community Survey distributes downloadable data about United States communities
# Download the 2006 microdata survey about housing for the state of Idaho
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv", "ss06hid.csv", method = "curl")
# Download the code book, describin... | /03_-_Getting_and_Cleaning_Data/Week_1_Quiz/Question_1.R | no_license | lvaylet/coursera-data-science-specialization | R | false | false | 711 | r | # The American Community Survey distributes downloadable data about United States communities
# Download the 2006 microdata survey about housing for the state of Idaho
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv", "ss06hid.csv", method = "curl")
# Download the code book, describin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getDictionaryEntries.R
\name{getDictionaryEntries}
\alias{getDictionaryEntries}
\title{Lookup entries in a dictionary.}
\usage{
getDictionaryEntries(labbcat.url, manager.id, dictionary.id, keys)
}
\arguments{
\item{labbcat.url}{URL to the LaB... | /man/getDictionaryEntries.Rd | no_license | cran/nzilbb.labbcat | R | false | true | 1,041 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getDictionaryEntries.R
\name{getDictionaryEntries}
\alias{getDictionaryEntries}
\title{Lookup entries in a dictionary.}
\usage{
getDictionaryEntries(labbcat.url, manager.id, dictionary.id, keys)
}
\arguments{
\item{labbcat.url}{URL to the LaB... |
# first set subjects folder as wd
setwd("~/files/PAT/AR13ROB161_2017_Dez_11_1406")
# read in PAT results
##change subject file name
PAT_AR13ROB161 <- read.csv("~/files/PAT/AR13ROB161_2017_Dez_11_1406/Absolute Pitch Experiment.csv")
target.note<-PAT_AR13ROB161$target.note #insert correct PAT file
# loop to read in all ... | /PAT Sound fileloop3.R | no_license | TeresaWenhart/PAT | R | false | false | 2,728 | r | # first set subjects folder as wd
setwd("~/files/PAT/AR13ROB161_2017_Dez_11_1406")
# read in PAT results
##change subject file name
PAT_AR13ROB161 <- read.csv("~/files/PAT/AR13ROB161_2017_Dez_11_1406/Absolute Pitch Experiment.csv")
target.note<-PAT_AR13ROB161$target.note #insert correct PAT file
# loop to read in all ... |
#' @useDynLib vroom, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL
#' Read a delimited file into a tibble
#'
#' @inheritParams readr::read_delim
#' @param file path to a local file.
#' @param num_threads Number of threads to use when reading and materializing vectors.
#' @export
#' @examples
#' \dontshow{
#'... | /R/pkg.R | permissive | danielarantes/vroom | R | false | false | 1,239 | r | #' @useDynLib vroom, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL
#' Read a delimited file into a tibble
#'
#' @inheritParams readr::read_delim
#' @param file path to a local file.
#' @param num_threads Number of threads to use when reading and materializing vectors.
#' @export
#' @examples
#' \dontshow{
#'... |
fhstep <- function(y,des,prvm) {
#get names of linear terms
lin<-colnames(des)
#make replacement table for use in getting quadratic names
values<-c("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
repl<-c("I(A^2)","I(B^2)","I(C^2)","I(D^2)","I(E^2)","I(F^2)",... | /R/fhstep.R | no_license | adamrauk-lilly/daewr | R | false | false | 2,612 | r | fhstep <- function(y,des,prvm) {
#get names of linear terms
lin<-colnames(des)
#make replacement table for use in getting quadratic names
values<-c("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
repl<-c("I(A^2)","I(B^2)","I(C^2)","I(D^2)","I(E^2)","I(F^2)",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_copy_object}
\alias{s3_copy_object}
\title{Creates a copy of an object that is already stored in Amazon S3}
\usage{
s3_copy_object(ACL, Bucket, CacheControl, ContentDisposition,
ContentEncoding, ContentLanguage, Con... | /cran/paws.storage/man/s3_copy_object.Rd | permissive | peoplecure/paws | R | false | true | 7,302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_copy_object}
\alias{s3_copy_object}
\title{Creates a copy of an object that is already stored in Amazon S3}
\usage{
s3_copy_object(ACL, Bucket, CacheControl, ContentDisposition,
ContentEncoding, ContentLanguage, Con... |
## Functions that will create an object that can be used to cache the inverse of the matrix.
## Create an object with a methods and place holder for holding the solved inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
## If x is modified set i to NULL
x <<- y
... | /cachematrix.R | no_license | corneil/datasciencecoursera | R | false | false | 836 | r | ## Functions that will create an object that can be used to cache the inverse of the matrix.
## Create an object with a methods and place holder for holding the solved inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
## If x is modified set i to NULL
x <<- y
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gemm.R
\name{gemm}
\alias{gemm}
\title{Analyze moderated mediation model using SEM}
\usage{
gemm(data = NULL, xvar, mvars, yvar, xmmod = NULL, mymod = NULL,
cmvars = NULL, cyvars = NULL, estMethod = "bootstrap",
nboot = 1000)
}
\arguments... | /man/gemm.Rd | no_license | psytext/rosetta | R | false | true | 1,190 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gemm.R
\name{gemm}
\alias{gemm}
\title{Analyze moderated mediation model using SEM}
\usage{
gemm(data = NULL, xvar, mvars, yvar, xmmod = NULL, mymod = NULL,
cmvars = NULL, cyvars = NULL, estMethod = "bootstrap",
nboot = 1000)
}
\arguments... |
#' Get data frames bound to node attributes
#' @description From a graph object of class
#' \code{dgr_graph}, get one or more data frames
#' already bound as node and/or edge attribute
#' values given graph node and/or edges.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param node_id a vector of nod... | /R/get_attr_dfs.R | permissive | wk1984/DiagrammeR | R | false | false | 7,599 | r | #' Get data frames bound to node attributes
#' @description From a graph object of class
#' \code{dgr_graph}, get one or more data frames
#' already bound as node and/or edge attribute
#' values given graph node and/or edges.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param node_id a vector of nod... |
# SAVE TABLES ------------------------------------------------------------------
# save npar_t_tests_res
write.table(npar_t_tests_res,
sep = ",",
file = "./outputs/tables/TabS1.csv",
quote = FALSE, row.names = TRUE
)
# save volcano_data
write.table(volcano_data[, c("fc", "p")],
sep = ",",
file = "./outputs/... | /tow-sample-tests/codes/outputs.R | no_license | lschimke/COVID19-and-HLH-paper | R | false | false | 1,612 | r | # SAVE TABLES ------------------------------------------------------------------
# save npar_t_tests_res
write.table(npar_t_tests_res,
sep = ",",
file = "./outputs/tables/TabS1.csv",
quote = FALSE, row.names = TRUE
)
# save volcano_data
write.table(volcano_data[, c("fc", "p")],
sep = ",",
file = "./outputs/... |
\name{qat_plot_roc_rule_static_1d}
\alias{qat_plot_roc_rule_static_1d}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot a static ROC rule result}
\description{
A plot of the result of a static ROC rule check will be produced.
}
\usage{
qat_plot_roc_rule_static_1d(flagvector, filename, measurem... | /man/qat_plot_roc_rule_static_1d.Rd | no_license | cran/qat | R | false | false | 2,129 | rd | \name{qat_plot_roc_rule_static_1d}
\alias{qat_plot_roc_rule_static_1d}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot a static ROC rule result}
\description{
A plot of the result of a static ROC rule check will be produced.
}
\usage{
qat_plot_roc_rule_static_1d(flagvector, filename, measurem... |
#Insurance保险公司测试数据
library(MASS)
data(Insurance)
dim(Insurance)
dim(Insurance[1:10,])
dim(Insurance[,2:4])
dim(Insurance)[1]
vars=c("District","Age")
Insurance[20:25,vars]
names(Insurance)
head(names(Insurance),n=2)
tail(names(Insurance),n=3)
head(Insurance$Age)
#变量类型
class(Insurance$District)
class(Insurance$Age)
cla... | /RSimpleExample.R | no_license | anyhuayong/r_demo | R | false | false | 497 | r | #Insurance保险公司测试数据
library(MASS)
data(Insurance)
dim(Insurance)
dim(Insurance[1:10,])
dim(Insurance[,2:4])
dim(Insurance)[1]
vars=c("District","Age")
Insurance[20:25,vars]
names(Insurance)
head(names(Insurance),n=2)
tail(names(Insurance),n=3)
head(Insurance$Age)
#变量类型
class(Insurance$District)
class(Insurance$Age)
cla... |
# 4 1000x27 Gene expression datasets from which a MultiMeasure object can be constructed
"TCGA" | /R/data.R | permissive | timpeters82/consensus | R | false | false | 98 | r | # 4 1000x27 Gene expression datasets from which a MultiMeasure object can be constructed
"TCGA" |
#==================================================================================================
# Importing and filtering marine array receiver data
# Date: March 22, 2021
# Creator: Luke Henslee, ADF&G and CFOS, UAF
#
#Purpose: To import ENS acoustic receiver data and output detection histories
# for all tags
#
#... | /R/All_detections.R | no_license | lukehenslee/ENS-Telemetry | R | false | false | 3,437 | r | #==================================================================================================
# Importing and filtering marine array receiver data
# Date: March 22, 2021
# Creator: Luke Henslee, ADF&G and CFOS, UAF
#
#Purpose: To import ENS acoustic receiver data and output detection histories
# for all tags
#
#... |
# Librerias ----
library(tidyverse)
library(gganimate)
library(janitor)
library(lubridate)
library(ggExtra)
library(ggimage)
# Bases de datos ----
bd = read_csv("Datos/multiTimeline.csv",
skip = 1)
# Nombres de las columnas
names(bd) = str_remove(names(bd),
pattern = "\\: \\(México\\)")
imgs... | /Day 22. Animation/code_21.R | no_license | JMZarco/30DayChartChallenge2021 | R | false | false | 4,460 | r | # Librerias ----
library(tidyverse)
library(gganimate)
library(janitor)
library(lubridate)
library(ggExtra)
library(ggimage)
# Bases de datos ----
bd = read_csv("Datos/multiTimeline.csv",
skip = 1)
# Nombres de las columnas
names(bd) = str_remove(names(bd),
pattern = "\\: \\(México\\)")
imgs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/explore.R
\name{runSummary}
\alias{runSummary}
\title{Executes mysummary function on complete list output by verticalSplit function}
\usage{
runSummary(lsVS)
}
\arguments{
\item{lsVS}{a list of dataframes produced by verticalSplit function}
}... | /man/runSummary.Rd | no_license | saurabhJaju/explore- | R | false | true | 739 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/explore.R
\name{runSummary}
\alias{runSummary}
\title{Executes mysummary function on complete list output by verticalSplit function}
\usage{
runSummary(lsVS)
}
\arguments{
\item{lsVS}{a list of dataframes produced by verticalSplit function}
}... |
library(survival)
# Test data set 1 for Fine-Gray regression
fdata <- data.frame(time =c(1,2,3,4,4,4,5,5,6,8,8, 9,10,12),
status=factor(c(1,2,0,1,0,0,2,1,0,0,2, 0,1 ,0), 0:2,
c("cen", "type1", "type2")),
x =c(5,4,3,1,2,1,1,2,2,4,6,1,2, 0),
... | /R-Portable-Win/library/survival/tests/finegray.R | permissive | rana2hin/electron-quick-start | R | false | false | 7,491 | r | library(survival)
# Test data set 1 for Fine-Gray regression
fdata <- data.frame(time =c(1,2,3,4,4,4,5,5,6,8,8, 9,10,12),
status=factor(c(1,2,0,1,0,0,2,1,0,0,2, 0,1 ,0), 0:2,
c("cen", "type1", "type2")),
x =c(5,4,3,1,2,1,1,2,2,4,6,1,2, 0),
... |
library(tidyr)
library(dplyr)
data = read.csv("collect12_NormJudg_Short_Cond_W_GPT2_QC.py.tsv", sep="\t")
data2 = data %>% group_by(Script, ID, Noun, Region, Condition, predictability_weight, deletion_rate) %>% summarise(Surprisal=mean(Surprisal), ThatFraction=mean(ThatFraction), SurprisalReweighted=mean(SurprisalRewe... | /initial/lm/trainAttention/raw_output/collect_Short_Cond_W_GPT2_QC.R | no_license | m-hahn/forgetting-model | R | false | false | 483 | r | library(tidyr)
library(dplyr)
data = read.csv("collect12_NormJudg_Short_Cond_W_GPT2_QC.py.tsv", sep="\t")
data2 = data %>% group_by(Script, ID, Noun, Region, Condition, predictability_weight, deletion_rate) %>% summarise(Surprisal=mean(Surprisal), ThatFraction=mean(ThatFraction), SurprisalReweighted=mean(SurprisalRewe... |
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("./household_power_consumption.zip")) {download.file(fileUrl, destfile = "./household_power_consumption.zip")}
fileCon <- unz("./household_power_consumption.zip", "household_power_consumption.txt")
idx... | /plot4.R | no_license | lukelklee/ExData_Plotting1 | R | false | false | 2,630 | r |
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("./household_power_consumption.zip")) {download.file(fileUrl, destfile = "./household_power_consumption.zip")}
fileCon <- unz("./household_power_consumption.zip", "household_power_consumption.txt")
idx... |
bookdown_file = function(...) {
system.file(..., package = 'bookdown', mustWork = TRUE)
}
# find the y[j] closest to x[i] with y[j] > x[i]
next_nearest = function(x, y) {
n = length(x); m = length(y); z = integer(n)
for (i in seq_len(n)) {
for (j in seq_len(m)) {
if (y[j] > x[i]) {
z[i] = y[j]
... | /R/utils.R | no_license | mingsnu/bookdown | R | false | false | 12,862 | r | bookdown_file = function(...) {
system.file(..., package = 'bookdown', mustWork = TRUE)
}
# find the y[j] closest to x[i] with y[j] > x[i]
next_nearest = function(x, y) {
n = length(x); m = length(y); z = integer(n)
for (i in seq_len(n)) {
for (j in seq_len(m)) {
if (y[j] > x[i]) {
z[i] = y[j]
... |
#function to source the required functions
get_functions <- function()
{
## main functions ##
source('./R/convert_date.R') #function to convert to date type
source('./R/check_nodb.R')
source('./R/calculate.R') #function to calculate the number of days to progression;otherwise,number of ... | /Upload/R/get_functions.R | no_license | kechincoh/shiny-server | R | false | false | 2,229 | r | #function to source the required functions
get_functions <- function()
{
## main functions ##
source('./R/convert_date.R') #function to convert to date type
source('./R/check_nodb.R')
source('./R/calculate.R') #function to calculate the number of days to progression;otherwise,number of ... |
#' Load a multiple packages, install most recent versions if missing
#'
#' @param pkgs character vector of packages names.
#' @param repos character vector, the base URL(s) of the repositories to use,
#' e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org".
#' @param ... arguments passed to \code{\link{... | /R/library_install.R | no_license | christophergandrud/simpleSetup | R | false | false | 1,198 | r | #' Load a multiple packages, install most recent versions if missing
#'
#' @param pkgs character vector of packages names.
#' @param repos character vector, the base URL(s) of the repositories to use,
#' e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org".
#' @param ... arguments passed to \code{\link{... |
# clear variables and close windows
rm(list = ls(all = TRUE))
graphics.off()
# Pseudo random numbers
set.seed(25)
r = rlnorm(10, 0.5, 0.5)
edf = function(x) {
n = length(x)
x = sort(x)
a = (1:n - 1)/n
aa = cbind(x[2:n], a[2:n])
bb = cbind(x[1:n - 1], a[2:n])
cc = rbind(aa, bb)
edf =... | /STFloss02/STFloss02.R | no_license | QuantLet/STF | R | false | false | 846 | r |
# clear variables and close windows
rm(list = ls(all = TRUE))
graphics.off()
# Pseudo random numbers
set.seed(25)
r = rlnorm(10, 0.5, 0.5)
edf = function(x) {
n = length(x)
x = sort(x)
a = (1:n - 1)/n
aa = cbind(x[2:n], a[2:n])
bb = cbind(x[1:n - 1], a[2:n])
cc = rbind(aa, bb)
edf =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.