content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(glmnet)
LASSO <- function(X, Y, new_X) {
cvfit = cv.glmnet(X, Y, alpha = 1, type.measure = "mse", nfolds = 10, intercept = F)
predict(cvfit, newx = new_X, s = "lambda.min")
}
Est_K <- function(X, K_max = 30) {
n <- nrow(X); p <- ncol(X)
U <- svd(X, nv = 0)$u
penalty <- (n + p) / n / p * log(p * n... | /code/Other_algorithms.R | no_license | jishnu-lab/ER | R | false | false | 1,853 | r | library(glmnet)
LASSO <- function(X, Y, new_X) {
cvfit = cv.glmnet(X, Y, alpha = 1, type.measure = "mse", nfolds = 10, intercept = F)
predict(cvfit, newx = new_X, s = "lambda.min")
}
Est_K <- function(X, K_max = 30) {
n <- nrow(X); p <- ncol(X)
U <- svd(X, nv = 0)$u
penalty <- (n + p) / n / p * log(p * n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getExportedValue.R
\name{getExportedValue}
\alias{getExportedValue}
\title{fun_name}
\usage{
getExportedValue(params)
}
\arguments{
\item{param}{fun_name}
}
\description{
kolejna funkcja podmieniona
}
\keyword{Gruba}
\keyword{Przy}
\keyword{b... | /man/getExportedValue.Rd | no_license | granatb/RapeR | R | false | true | 412 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getExportedValue.R
\name{getExportedValue}
\alias{getExportedValue}
\title{fun_name}
\usage{
getExportedValue(params)
}
\arguments{
\item{param}{fun_name}
}
\description{
kolejna funkcja podmieniona
}
\keyword{Gruba}
\keyword{Przy}
\keyword{b... |
## if(getRversion() < "2.13") {
## nobs <- function (object, ...) UseMethod("nobs")
## ## also used for mlm fits *and* lmrob :
## nobs.lm <- function(object, ...)
## if(!is.null(w <- object$weights)) sum(w != 0) else NROW(object$residuals)
## ## for glmrob :
## nobs.glm <- function(object, ...) s... | /pkgs/robustbase/R/AAA.R | no_license | vaguiar/EDAV_Project_2017 | R | false | false | 4,260 | r |
## if(getRversion() < "2.13") {
## nobs <- function (object, ...) UseMethod("nobs")
## ## also used for mlm fits *and* lmrob :
## nobs.lm <- function(object, ...)
## if(!is.null(w <- object$weights)) sum(w != 0) else NROW(object$residuals)
## ## for glmrob :
## nobs.glm <- function(object, ...) s... |
#' Example breast cancer RNA editing dataset.
#'
#' @description A subset of the TCGA breast cancer RNA editing dataset for 272
#' edited sites on genes PHACTR4, CCR5, METTL7A and a few randomly sampled
#' sites for 221 subjects.
#'
#' @format A data frame containing RNA editing levels for 272 sites (in the
#' r... | /R/data_rnaedit_df.R | no_license | TransBioInfoLab/rnaEditr | R | false | false | 485 | r | #' Example breast cancer RNA editing dataset.
#'
#' @description A subset of the TCGA breast cancer RNA editing dataset for 272
#' edited sites on genes PHACTR4, CCR5, METTL7A and a few randomly sampled
#' sites for 221 subjects.
#'
#' @format A data frame containing RNA editing levels for 272 sites (in the
#' r... |
### 主成分分析
### 人工データ(2次元)による例
set.seed(123)
n <- 100 # データ数
(a <- c(1, 2)/sqrt(5)) # 主成分方向(単位ベクトル)の設定
mydata <- data.frame(runif(n,-1,1) %o% a + rnorm(2*n, sd=0.2))
names(mydata) <- paste0("x",1:2) # 観測データ
## aのスカラー倍に正規乱数がのった形となっており
## a方向に本質的な情報が集約されていることがわかる
head(mydata) # データの一部を表示
plot(mydata, asp=1, # 縦横比を1とした散布図
... | /docs/autumn/code/07-toy.r | no_license | noboru-murata/sda | R | false | false | 1,188 | r | ### 主成分分析
### 人工データ(2次元)による例
set.seed(123)
n <- 100 # データ数
(a <- c(1, 2)/sqrt(5)) # 主成分方向(単位ベクトル)の設定
mydata <- data.frame(runif(n,-1,1) %o% a + rnorm(2*n, sd=0.2))
names(mydata) <- paste0("x",1:2) # 観測データ
## aのスカラー倍に正規乱数がのった形となっており
## a方向に本質的な情報が集約されていることがわかる
head(mydata) # データの一部を表示
plot(mydata, asp=1, # 縦横比を1とした散布図
... |
#' Title
#'
#' @param data.rdu
#' @param kdebug1
#' @param JustEvent
#'
#' @return NULL
#' @export
#' @name RiskSet
#' @rdname RiskSet_r
#'
#' @examples
#' \dontrun{
#'
#' halfbeak.rdu <- frame.to.rdu(halfbeak,
#' ID.column = "unit",
#' time.column = "hours... | /R/RiskSet.R | no_license | anhnguyendepocen/SMRD | R | false | false | 2,036 | r | #' Title
#'
#' @param data.rdu
#' @param kdebug1
#' @param JustEvent
#'
#' @return NULL
#' @export
#' @name RiskSet
#' @rdname RiskSet_r
#'
#' @examples
#' \dontrun{
#'
#' halfbeak.rdu <- frame.to.rdu(halfbeak,
#' ID.column = "unit",
#' time.column = "hours... |
datasets = read.csv('Data.csv')
datasets$Age = ifelse(is.na(datasets$Age),
ave(datasets$Age, FUN = function(x) mean(x, na.rm = TRUE)),
datasets$Age)
datasets$Salary = ifelse(is.na(datasets$Salary ),
ave(datasets$Salary , FUN = function(x) mean(x, na.rm... | /Part 1 - Data Preprocessing/test_R_1.R | no_license | taimurIslam/Machine-Learning-A-Z | R | false | false | 369 | r | datasets = read.csv('Data.csv')
datasets$Age = ifelse(is.na(datasets$Age),
ave(datasets$Age, FUN = function(x) mean(x, na.rm = TRUE)),
datasets$Age)
datasets$Salary = ifelse(is.na(datasets$Salary ),
ave(datasets$Salary , FUN = function(x) mean(x, na.rm... |
#' @export
CAplotsMultDataSets <- function(atSea=NULL, port=NULL, fsrs=NULL, out.dir='bio.lobster',subset=F) {
#using the three year aggregated LCAs
fd = file.path(project.figuredirectory(out.dir),'CohortAnalysisPlots')
dir.create( fd, recursive = TRUE, showWarnings = FALSE )
lf = c(27,29,32,33)
for... | /R/CAplotsMultDataSets.r | no_license | LobsterScience/bio.lobster | R | false | false | 1,754 | r | #' @export
CAplotsMultDataSets <- function(atSea=NULL, port=NULL, fsrs=NULL, out.dir='bio.lobster',subset=F) {
#using the three year aggregated LCAs
fd = file.path(project.figuredirectory(out.dir),'CohortAnalysisPlots')
dir.create( fd, recursive = TRUE, showWarnings = FALSE )
lf = c(27,29,32,33)
for... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vca.R
\name{vca}
\alias{vca}
\title{Title}
\usage{
vca(R, p, SNR = NULL, verbose = F)
}
\arguments{
\item{R}{matrix describing points (possibly lyinh in a simplex) in high dimensional space}
\item{p}{number endpoints to find}
\item{SNR}{sig... | /man/vca.Rd | no_license | ctlab/ClusDec | R | false | true | 504 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vca.R
\name{vca}
\alias{vca}
\title{Title}
\usage{
vca(R, p, SNR = NULL, verbose = F)
}
\arguments{
\item{R}{matrix describing points (possibly lyinh in a simplex) in high dimensional space}
\item{p}{number endpoints to find}
\item{SNR}{sig... |
#
# litvals.R, 24 Apr 18
# Data from:
#
# The New C Standard
# Derek M. Jones
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
pal_col=rainbow(2)
int_lit=read.csv(paste0(ESEUR_dir, "sourcecode/intlitvals.csv.xz"), as.is=TRUE)
hex_lit=read.csv(paste0(ESEUR_dir, "s... | /sourcecode/litvals.R | no_license | alanponce/ESEUR-code-data | R | false | false | 648 | r | #
# litvals.R, 24 Apr 18
# Data from:
#
# The New C Standard
# Derek M. Jones
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
pal_col=rainbow(2)
int_lit=read.csv(paste0(ESEUR_dir, "sourcecode/intlitvals.csv.xz"), as.is=TRUE)
hex_lit=read.csv(paste0(ESEUR_dir, "s... |
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 69516, as.is = TRUE);
data <- rbind( data[data$Date == "1/2/2007" , ] , data[ data$Date == "2/2/2007" , ]);
library(dplyr);
windows();
par(mfrow = c(2,2))
# First plot (top-left)
data <- mutate(data, Global_active_power = as.nu... | /plot4.R | no_license | marcossf82/ExData_Plotting1 | R | false | false | 1,605 | r | data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 69516, as.is = TRUE);
data <- rbind( data[data$Date == "1/2/2007" , ] , data[ data$Date == "2/2/2007" , ]);
library(dplyr);
windows();
par(mfrow = c(2,2))
# First plot (top-left)
data <- mutate(data, Global_active_power = as.nu... |
dmtbino <- function(x,size,Q) {
drop(sapply(Q[,1],dtbino,x=x,size=size)%*%Q[,2])
} | /R/dmtbino.R | no_license | leandroroser/Ares_1.2-4 | R | false | false | 85 | r |
dmtbino <- function(x,size,Q) {
drop(sapply(Q[,1],dtbino,x=x,size=size)%*%Q[,2])
} |
# pareto density plot
reversePareto<-function(u,alpha=3){
return(1/u^(1/alpha))
}
paretoProb<-function(z,prob=1e-6,alpha=3){
return(1/prob*alpha*z^(-alpha-1)*(1-z^(-alpha))^(1/prob-1))
}
# how much of the furute prediction interval contains the real
futureCIcontain<-function(prob=1e-6,alpha=3,PI){
return((1-PI[2]... | /apgarchtest.R | no_license | rodvei/ACER-vs-MCMC-GEV.R | R | false | false | 12,702 | r | # pareto density plot
reversePareto<-function(u,alpha=3){
return(1/u^(1/alpha))
}
paretoProb<-function(z,prob=1e-6,alpha=3){
return(1/prob*alpha*z^(-alpha-1)*(1-z^(-alpha))^(1/prob-1))
}
# how much of the furute prediction interval contains the real
futureCIcontain<-function(prob=1e-6,alpha=3,PI){
return((1-PI[2]... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_sg.R
\name{summary.sg}
\alias{summary.sg}
\title{sg summary}
\usage{
\method{summary}{sg}(object, ...)
}
\arguments{
\item{object}{sg object}
\item{...}{ignored}
}
\description{
sg summary
}
| /man/summary.sg.Rd | no_license | antiphon/spatgraphs | R | false | true | 276 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_sg.R
\name{summary.sg}
\alias{summary.sg}
\title{sg summary}
\usage{
\method{summary}{sg}(object, ...)
}
\arguments{
\item{object}{sg object}
\item{...}{ignored}
}
\description{
sg summary
}
|
context("Rle")
test_that("Rle construction works", {
x1 <- c(1, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 8, 8, 8.01)
expect_true(all(biosignals:::asRle(x1) == Rle(x1)))
})
test_that("Rle constructor handles weird input", {
## An Rle with uniform input killed my entire sunday
r1 <- biosignals:::asRle(rep(10, 5))
ir1... | /inst/tests/test-Rle.R | no_license | lianos/biosignals | R | false | false | 1,572 | r | context("Rle")
test_that("Rle construction works", {
x1 <- c(1, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 8, 8, 8.01)
expect_true(all(biosignals:::asRle(x1) == Rle(x1)))
})
test_that("Rle constructor handles weird input", {
## An Rle with uniform input killed my entire sunday
r1 <- biosignals:::asRle(rep(10, 5))
ir1... |
\name{regcor}
\alias{regcor}
\title{
Regularized correlation matrix estimation
}
\description{
\code{regcor} is a function that determines the optimal penalty value and, subsequently, the optimal Ledoit-Wolf type regularized correlation matrix using K-fold cross validation of the negative log-likelihood.
}
\usage{
regc... | /man/regcor.Rd | no_license | CFWP/FMradio | R | false | false | 3,845 | rd | \name{regcor}
\alias{regcor}
\title{
Regularized correlation matrix estimation
}
\description{
\code{regcor} is a function that determines the optimal penalty value and, subsequently, the optimal Ledoit-Wolf type regularized correlation matrix using K-fold cross validation of the negative log-likelihood.
}
\usage{
regc... |
# Projeto Regressão Logística
# Reabsorção radicular externa após reimplantes de dentes permanentes
#O objetivo do estudo foi identificar a associação do desfecho, RRE,
#com a idade no momento do trauma e com variáveis clínicas relacionadas ao
#manejo e tratamento emergencial do dente avulsionado.
# Remove todo... | /7. Projeto Regressão Logística.R | no_license | amandasmagalhaes/metodos-estatisticos-epidemio | R | false | false | 10,322 | r | # Projeto Regressão Logística
# Reabsorção radicular externa após reimplantes de dentes permanentes
#O objetivo do estudo foi identificar a associação do desfecho, RRE,
#com a idade no momento do trauma e com variáveis clínicas relacionadas ao
#manejo e tratamento emergencial do dente avulsionado.
# Remove todo... |
#Random Forest Model
library(randomForest)
library('dplyr')
library("caret")
#divide the data into train and test
# to get same data in each time
set.seed(123)
train = data[sample(nrow(data), 20000, replace = F), ]
test = data[!(1:nrow(data)) %in% as.numeric(row.names(train)), ]
rf_model <- randomFore... | /4.Random Forest Evaluation.R | no_license | rakesh-analytics/interest-rate-project | R | false | false | 1,497 | r | #Random Forest Model
library(randomForest)
library('dplyr')
library("caret")
#divide the data into train and test
# to get same data in each time
set.seed(123)
train = data[sample(nrow(data), 20000, replace = F), ]
test = data[!(1:nrow(data)) %in% as.numeric(row.names(train)), ]
rf_model <- randomFore... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jglmm.r
\name{jglmm}
\alias{jglmm}
\title{Fitting Generalized Linear Mixed-Effects Models in Julia}
\usage{
jglmm(
formula,
data,
family = "normal",
link = NULL,
weights = NULL,
contrasts = NULL,
return_val = c("jglmm", "julia_m... | /man/jglmm.Rd | no_license | bbolker/jglmm | R | false | true | 1,823 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jglmm.r
\name{jglmm}
\alias{jglmm}
\title{Fitting Generalized Linear Mixed-Effects Models in Julia}
\usage{
jglmm(
formula,
data,
family = "normal",
link = NULL,
weights = NULL,
contrasts = NULL,
return_val = c("jglmm", "julia_m... |
\docType{methods}
\name{dbListResults,SQLiteConnection-method}
\alias{dbListResults,SQLiteConnection-method}
\title{List available SQLite result sets.}
\usage{
\S4method{dbListResults}{SQLiteConnection}(conn, ...)
}
\arguments{
\item{conn}{An existing
\code{\linkS4class{SQLiteConnection}}}
\item{...}{Ignored. In... | /man/dbListResults-SQLiteConnection-method.Rd | permissive | snowdj/RSQLite | R | false | false | 416 | rd | \docType{methods}
\name{dbListResults,SQLiteConnection-method}
\alias{dbListResults,SQLiteConnection-method}
\title{List available SQLite result sets.}
\usage{
\S4method{dbListResults}{SQLiteConnection}(conn, ...)
}
\arguments{
\item{conn}{An existing
\code{\linkS4class{SQLiteConnection}}}
\item{...}{Ignored. In... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/correlation_clique.R
\name{correlation_set_module_size}
\alias{correlation_set_module_size}
\title{correlation_set_module_size}
\usage{
correlation_set_module_size(size, correlation_module)
}
\arguments{
\item{size}{Module object that has bee... | /man/correlation_set_module_size.Rd | no_license | ddeweerd/MODifieRDev | R | false | true | 820 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/correlation_clique.R
\name{correlation_set_module_size}
\alias{correlation_set_module_size}
\title{correlation_set_module_size}
\usage{
correlation_set_module_size(size, correlation_module)
}
\arguments{
\item{size}{Module object that has bee... |
Response <- function(fit, x, trans, alpha, ...) {
## Calculate predictions, partial residuals
if ("randomForest" %in% class(fit)) {
if (fit$type=="regression") rr <- fit$y - fit$predicted
if (fit$type=="classification") {
P <- predict(fit, type="prob")
rr <- (fit$y==colnames(P)[2]) - P[,2]
}... | /R/Response.R | no_license | oldi/visreg | R | false | false | 2,511 | r | Response <- function(fit, x, trans, alpha, ...) {
## Calculate predictions, partial residuals
if ("randomForest" %in% class(fit)) {
if (fit$type=="regression") rr <- fit$y - fit$predicted
if (fit$type=="classification") {
P <- predict(fit, type="prob")
rr <- (fit$y==colnames(P)[2]) - P[,2]
}... |
#### Include library
library(psych)
library(MASS)
library(ggplot2)
library(plotly)
countsInWindows = 0
annotationFile$ANKLE_COUNTS_ADDED <- NA
annotationFile$WRIST_COUNTS_ADDED <- NA
annotationFile$TOTAL_ROWS_TEMP_ANKLE <- NA
annotationFile$TOTAL_ROWS_TEMP_WRIST <- NA
flag = 0
for (i in 1:nrow(annotationFile)){
... | /microEMAReferenceCountsManager/getCountsSummaryForLabels.R | no_license | adityaponnada/microEMA-Preprocessing | R | false | false | 1,854 | r | #### Include library
library(psych)
library(MASS)
library(ggplot2)
library(plotly)
countsInWindows = 0
annotationFile$ANKLE_COUNTS_ADDED <- NA
annotationFile$WRIST_COUNTS_ADDED <- NA
annotationFile$TOTAL_ROWS_TEMP_ANKLE <- NA
annotationFile$TOTAL_ROWS_TEMP_WRIST <- NA
flag = 0
for (i in 1:nrow(annotationFile)){
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acf.R
\name{plot.theo_arma}
\alias{autoplot.theo_arma}
\alias{plot.theo_arma}
\title{Plot Theoretical Autocorrelation (ACF) for ARMA Models}
\usage{
\method{plot}{theo_arma}(x, ...)
\method{autoplot}{theo_arma}(object, ...)
}
\arguments{
\it... | /man/plot.theo_arma.Rd | no_license | SMAC-Group/exts | R | false | true | 850 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acf.R
\name{plot.theo_arma}
\alias{autoplot.theo_arma}
\alias{plot.theo_arma}
\title{Plot Theoretical Autocorrelation (ACF) for ARMA Models}
\usage{
\method{plot}{theo_arma}(x, ...)
\method{autoplot}{theo_arma}(object, ...)
}
\arguments{
\it... |
fpiter <- function(par, fixptfn, objfn=NULL, control=list( ), ...){
control.default <- list(tol=1.e-07, maxiter=5000, trace=FALSE)
namc <- names(control)
if (!all(namc %in% names(control.default)))
stop("unknown names in control: ", namc[!(namc %in% names(control.default))])
ctrl <- modifyList(control.defa... | /R/fpiter.R | no_license | cran/daarem | R | false | false | 1,268 | r | fpiter <- function(par, fixptfn, objfn=NULL, control=list( ), ...){
control.default <- list(tol=1.e-07, maxiter=5000, trace=FALSE)
namc <- names(control)
if (!all(namc %in% names(control.default)))
stop("unknown names in control: ", namc[!(namc %in% names(control.default))])
ctrl <- modifyList(control.defa... |
#------------------ Classification -----------------#
# features <- c("session_id",
# "day",
# "hour",
# "course",
# "wind_speed",
# "temperature",
# "period",
# "heading",
# "middle_lat",
# "... | /sensemy/rscripts/features.R | no_license | danielasocas/it | R | false | false | 2,481 | r | #------------------ Classification -----------------#
# features <- c("session_id",
# "day",
# "hour",
# "course",
# "wind_speed",
# "temperature",
# "period",
# "heading",
# "middle_lat",
# "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_columns.R
\name{column_categorical_with_identity}
\alias{column_categorical_with_identity}
\title{Construct a Categorical Column that Returns Identity Values}
\usage{
column_categorical_with_identity(..., num_buckets, default_value = ... | /man/column_categorical_with_identity.Rd | no_license | MhAmine/tfestimators | R | false | true | 2,197 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_columns.R
\name{column_categorical_with_identity}
\alias{column_categorical_with_identity}
\title{Construct a Categorical Column that Returns Identity Values}
\usage{
column_categorical_with_identity(..., num_buckets, default_value = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pffr-methods.R
\name{qq.pffr}
\alias{qq.pffr}
\title{QQ plots for pffr model residuals}
\usage{
qq.pffr(object, rep = 0, level = 0.9, s.rep = 10, type = c("deviance",
"pearson", "response"), pch = ".", rl.col = 2, rep.col = "gray80", ...)
}... | /man/qq.pffr.Rd | no_license | dill/refund | R | false | true | 1,380 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pffr-methods.R
\name{qq.pffr}
\alias{qq.pffr}
\title{QQ plots for pffr model residuals}
\usage{
qq.pffr(object, rep = 0, level = 0.9, s.rep = 10, type = c("deviance",
"pearson", "response"), pch = ".", rl.col = 2, rep.col = "gray80", ...)
}... |
[
{
"title": "Statistics: Losing Ground to CS, Losing Image Among Students",
"href": "https://matloff.wordpress.com/2014/08/26/statistics-losing-ground-to-cs-losing-image-among-students/"
},
{
"title": "Revolution Newsletter: October 2011",
"href": "http://blog.revolutionanalytics.com/2011/10/rev... | /json/218.r | no_license | rweekly/rweekly.org | R | false | false | 8,334 | r | [
{
"title": "Statistics: Losing Ground to CS, Losing Image Among Students",
"href": "https://matloff.wordpress.com/2014/08/26/statistics-losing-ground-to-cs-losing-image-among-students/"
},
{
"title": "Revolution Newsletter: October 2011",
"href": "http://blog.revolutionanalytics.com/2011/10/rev... |
# 安装package ---------------------------------------------------------------------
#
# packages=c("shiny","ggprism","htmltools","thematic","tidyverse","ggpubr","ggthemes","rstatix","DT","ggpubr", "ggsci", "agricolae")
# ipak <- function(pkg){
# new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
# if... | /bar_plot/app.R | no_license | barnett874/barplot_bs4Dash | R | false | false | 23,263 | r |
# 安装package ---------------------------------------------------------------------
#
# packages=c("shiny","ggprism","htmltools","thematic","tidyverse","ggpubr","ggthemes","rstatix","DT","ggpubr", "ggsci", "agricolae")
# ipak <- function(pkg){
# new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
# if... |
######################
library("gridExtra")
library("ggplot2")
library("grid")
#####################
panel.correlation <- function(x, y, corMethod="spearman", digits=2, prefix="", cex.cor, col="black",...)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- cor(x, y,method=corMethod)
txt <- fo... | /R/corPlot.R | no_license | apratap/rbundle | R | false | false | 1,182 | r | ######################
library("gridExtra")
library("ggplot2")
library("grid")
#####################
panel.correlation <- function(x, y, corMethod="spearman", digits=2, prefix="", cex.cor, col="black",...)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- cor(x, y,method=corMethod)
txt <- fo... |
#1 Use data in the birthwt dataset in the MASS library
library(MASS)
View(birthwt)
#1a Construct three density plots of birthweight (bwt) grouping by race
#in the same plotting pane
library(ggplot2)
f<- ggplot(birthwt, aes(x=bwt, fill=race))
f+ geom_density(color="red",alpha=.4)+theme_bw()+
scale_fill_brewer(... | /5. ggplot2.R | no_license | nhinguyen23/Homework | R | false | false | 2,265 | r | #1 Use data in the birthwt dataset in the MASS library
library(MASS)
View(birthwt)
#1a Construct three density plots of birthweight (bwt) grouping by race
#in the same plotting pane
library(ggplot2)
f<- ggplot(birthwt, aes(x=bwt, fill=race))
f+ geom_density(color="red",alpha=.4)+theme_bw()+
scale_fill_brewer(... |
#Word Cloud
#(http://www.sthda.com/english/wiki/word-cloud-generator-in-r-one-killer-function-to-do-everything-you-need)
#WordCloud From : an R object containing plain text; a txt file containing plain text. It works with local and online hosted txt files; A URL of a web page
#Install Packages
library(wordcloud)
inst... | /Word cloud.R | no_license | miliraj/analytics1 | R | false | false | 2,071 | r | #Word Cloud
#(http://www.sthda.com/english/wiki/word-cloud-generator-in-r-one-killer-function-to-do-everything-you-need)
#WordCloud From : an R object containing plain text; a txt file containing plain text. It works with local and online hosted txt files; A URL of a web page
#Install Packages
library(wordcloud)
inst... |
library(rCharts)
library(reshape2)
library(plyr)
library(scales)
CWFull=read.csv("CAWomen.csv")
TotCrimesmelt=melt(CWFull,id=c("Year","StateUT"))
save(TotCrimesmelt,file="TotCrimesmelt.rda")
TCrimeplot=nPlot(value~Year, group="variable", data=TotCrimesmelt[which(TotCrimesmelt$StateUT=="TOTAL"),... | /state1.R | no_license | tush9011/tush9011.github.io | R | false | false | 5,902 | r |
library(rCharts)
library(reshape2)
library(plyr)
library(scales)
CWFull=read.csv("CAWomen.csv")
TotCrimesmelt=melt(CWFull,id=c("Year","StateUT"))
save(TotCrimesmelt,file="TotCrimesmelt.rda")
TCrimeplot=nPlot(value~Year, group="variable", data=TotCrimesmelt[which(TotCrimesmelt$StateUT=="TOTAL"),... |
# The implementation of improved EE.
# Pay attention that we haven't consider about storage cost of these functions.
#-------------------------------------------------------------------------------
library("igraph")
library('magic')
library("matlab")
library('foreach')
library('doParallel')
source('thresho... | /improved_EE.r | no_license | ZJQxxn/Improved-EE | R | false | false | 2,565 | r | # The implementation of improved EE.
# Pay attention that we haven't consider about storage cost of these functions.
#-------------------------------------------------------------------------------
library("igraph")
library('magic')
library("matlab")
library('foreach')
library('doParallel')
source('thresho... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wm_id2name.R
\name{wm_id2name}
\alias{wm_id2name}
\alias{wm_id2name_}
\title{Get taxonomic name for an AphiaID}
\usage{
wm_id2name(id, ...)
wm_id2name_(id, ...)
}
\arguments{
\item{id}{(numeric/integer) an AphiaID, required. For \code{wm_id2... | /man/wm_id2name.Rd | permissive | shivam11/worrms | R | false | true | 1,268 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wm_id2name.R
\name{wm_id2name}
\alias{wm_id2name}
\alias{wm_id2name_}
\title{Get taxonomic name for an AphiaID}
\usage{
wm_id2name(id, ...)
wm_id2name_(id, ...)
}
\arguments{
\item{id}{(numeric/integer) an AphiaID, required. For \code{wm_id2... |
# utility for drawing labeled vectors
# TODO: handle xpd=TRUE somewhere so labels aren't cut off
# DONE: allow origin to be a two-col matrix like x
# TODO: calculate default length in terms of par("usr")
vectors <- function(x, origin=c(0,0), labels=rownames(x),
scale=1,
col="blue",
lwd=1,
cex=1,
... | /R/vectors.R | no_license | cran/candisc | R | false | false | 906 | r | # utility for drawing labeled vectors
# TODO: handle xpd=TRUE somewhere so labels aren't cut off
# DONE: allow origin to be a two-col matrix like x
# TODO: calculate default length in terms of par("usr")
vectors <- function(x, origin=c(0,0), labels=rownames(x),
scale=1,
col="blue",
lwd=1,
cex=1,
... |
# This script visualizes our Data Gathering, Merging and Manipulating Process with the example of Turkey
source("0 - Loading Packages.R")
PreGTD <- read.csv("TerrorData/pregtd.csv")
#Finding 2 basic maps of Turkey for visualisation
Turkey <- qmap("Davulga", zoom = 7, extent = "device", legend = "topleft")
BaseMap <- q... | /AttackVis.R | no_license | Leonardo2011/UrbanTerror | R | false | false | 12,892 | r | # This script visualizes our Data Gathering, Merging and Manipulating Process with the example of Turkey
source("0 - Loading Packages.R")
PreGTD <- read.csv("TerrorData/pregtd.csv")
#Finding 2 basic maps of Turkey for visualisation
Turkey <- qmap("Davulga", zoom = 7, extent = "device", legend = "topleft")
BaseMap <- q... |
#load the tidyverse. enough constituent packages were used to warrant loading the
#whole thing
library(tidyverse)
#download and unzip the data
download.file(url = 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip',
destfile = 'getdata_projectfiles_UCI HAR Dataset.zip... | /run_analysis.R | no_license | LeanMC/UCI-HAR-summary | R | false | false | 2,455 | r | #load the tidyverse. enough constituent packages were used to warrant loading the
#whole thing
library(tidyverse)
#download and unzip the data
download.file(url = 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip',
destfile = 'getdata_projectfiles_UCI HAR Dataset.zip... |
starwars %>%
dplyr::select(height, mass)
| /ex_ans/ts_error4a.R | no_license | psy218/r_tutorial | R | false | false | 44 | r | starwars %>%
dplyr::select(height, mass)
|
test_that("List of Speices matches the data", {
X<-ListSpecies()
expect_identical(X[1],Species[1])
})
| /tests/testthat/test-ListSpecies.R | permissive | Tsmnbx/ZooGVT | R | false | false | 106 | r | test_that("List of Speices matches the data", {
X<-ListSpecies()
expect_identical(X[1],Species[1])
})
|
# clean and compile phytometer biomass and in situ stem count
# authors: LMH, CTW
# created: Jan 2019
# script purpose:
# calculate average individual phytometer weights per species per competition plot
# > necesitates making data QA decisions..
# (TO DO [later, extra]: create addition cleaned up dataset for just AVFA... | /Competition/Data-cleaning/Phytometer-stem-biomass_datacleaning.R | no_license | HallettLab/usda-climvar | R | false | false | 10,763 | r | # clean and compile phytometer biomass and in situ stem count
# authors: LMH, CTW
# created: Jan 2019
# script purpose:
# calculate average individual phytometer weights per species per competition plot
# > necesitates making data QA decisions..
# (TO DO [later, extra]: create addition cleaned up dataset for just AVFA... |
##Reading in results from non-economic simulation on all
##livestock exploitations in Flanders
#Including dynamic simulation 2016-2035
#Required packages + defining GAMS directory
library(gdxrrw)
library(reshape2)
library(ggplot2)
library(scales)
library(qdap)
igdx("C:/GAMS/win64/24.7/")
#Clear environment
rm(lis... | /PostProcessing_NonEconomic.R | no_license | DaafDP/SO_Flanders | R | false | false | 28,595 | r | ##Reading in results from non-economic simulation on all
##livestock exploitations in Flanders
#Including dynamic simulation 2016-2035
#Required packages + defining GAMS directory
library(gdxrrw)
library(reshape2)
library(ggplot2)
library(scales)
library(qdap)
igdx("C:/GAMS/win64/24.7/")
#Clear environment
rm(lis... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale_WMRR.R
\name{scaleWMRR}
\alias{scaleWMRR}
\title{Scaling by wavelet multiresolution regression (WMRR)}
\usage{
scaleWMRR(
formula,
family,
data,
coord,
scale = 1,
detail = TRUE,
wavelet = "haar",
wtrafo = "... | /man/scaleWMRR.Rd | no_license | cran/spind | R | false | true | 5,637 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale_WMRR.R
\name{scaleWMRR}
\alias{scaleWMRR}
\title{Scaling by wavelet multiresolution regression (WMRR)}
\usage{
scaleWMRR(
formula,
family,
data,
coord,
scale = 1,
detail = TRUE,
wavelet = "haar",
wtrafo = "... |
# read in the CSV file
temps = read.csv("temp_log", header = FALSE, sep = ",");
# create an image device on which to draw the plot
png(filename="temp_log.png",height=800,width=800,res=72);
# plot the data points
plot(0:(length(temps)-1),temps/100,ylab="Temperature (degrees Celsius)",xlab="Time (in measurement ... | /ADC/generatePlot.R | no_license | bilodeau/ECE477PROJECTS | R | false | false | 461 | r | # read in the CSV file
temps = read.csv("temp_log", header = FALSE, sep = ",");
# create an image device on which to draw the plot
png(filename="temp_log.png",height=800,width=800,res=72);
# plot the data points
plot(0:(length(temps)-1),temps/100,ylab="Temperature (degrees Celsius)",xlab="Time (in measurement ... |
# Functions used only for testing
# Step Size Expectation ---------------------------------------------------
expect_step <- function(actual, x, f, df, alpha = x, nfev, tolerance = 1e-4) {
expect_equal(actual$step$par, x, tolerance = tolerance)
expect_equal(actual$step$f, f, tolerance = tolerance)
expect... | /data/genthat_extracted_code/mize/tests/helper_util.R | no_license | surayaaramli/typeRrh | R | false | false | 9,170 | r | # Functions used only for testing
# Step Size Expectation ---------------------------------------------------
expect_step <- function(actual, x, f, df, alpha = x, nfev, tolerance = 1e-4) {
expect_equal(actual$step$par, x, tolerance = tolerance)
expect_equal(actual$step$f, f, tolerance = tolerance)
expect... |
#=================================================================================================#
# PLOT 4: Multiple plots
# Load packages used in script
require(dplyr)
require(lubridate)
require(reshape2)
# Set working directory
setwd("./Working_directory/Exploratory data analysis")
# Read data and on... | /Plot4.R | no_license | HenkPret/ExData_Plotting1 | R | false | false | 3,904 | r | #=================================================================================================#
# PLOT 4: Multiple plots
# Load packages used in script
require(dplyr)
require(lubridate)
require(reshape2)
# Set working directory
setwd("./Working_directory/Exploratory data analysis")
# Read data and on... |
# like seq_len but starts from 0L so it can be used for iterating through c vectors
seq_len_0 <- function(len) {
seq_len(len) - 1L
}
# Works like seq_along for many COPASI vectors (0 based index)
seq_along_v <- function(c_copasivector) {
len <- c_copasivector$size()
if (len == 0L)
return(integer())
s... | /R/utils_copasi_vector.R | permissive | jpahle/CoRC | R | false | false | 1,097 | r | # like seq_len but starts from 0L so it can be used for iterating through c vectors
seq_len_0 <- function(len) {
seq_len(len) - 1L
}
# Works like seq_along for many COPASI vectors (0 based index)
seq_along_v <- function(c_copasivector) {
len <- c_copasivector$size()
if (len == 0L)
return(integer())
s... |
#' @name spsurml
#' @rdname spsurml
#' @title Maximum likelihood estimation of spatial SUR model.
#' @description This function estimates spatial SUR models using
#' maximum-likelihood methods.The number of equations, time periods
#' and cross-sectional units is not restricted.The user can choose
#' betw... | /R/spsurml.R | no_license | shizelong1985/spsur | R | false | false | 39,802 | r | #' @name spsurml
#' @rdname spsurml
#' @title Maximum likelihood estimation of spatial SUR model.
#' @description This function estimates spatial SUR models using
#' maximum-likelihood methods.The number of equations, time periods
#' and cross-sectional units is not restricted.The user can choose
#' betw... |
\name{amn}
\alias{amn}
\alias{18.5.7}
\alias{18.5.8}
\title{matrix a on page 637}
\description{
Matrix of coefficients of the Taylor series for
\eqn{\sigma(z)}{sigma(z)} as described on page 636 and tabulated on page
637.
}
\usage{
amn(u)
}
\arguments{
\item{u}{Integer specifying size of output matrix}
}
\details{
... | /man/amn.Rd | no_license | RobinHankin/elliptic | R | false | false | 551 | rd | \name{amn}
\alias{amn}
\alias{18.5.7}
\alias{18.5.8}
\title{matrix a on page 637}
\description{
Matrix of coefficients of the Taylor series for
\eqn{\sigma(z)}{sigma(z)} as described on page 636 and tabulated on page
637.
}
\usage{
amn(u)
}
\arguments{
\item{u}{Integer specifying size of output matrix}
}
\details{
... |
# description -------------------------------------------------------------
# TidyTuesday week 37 Formula 1
# set up -----------------------------------------------------------------
if(!require(pacman)) install.package("pacman")
devtools::install_github("davidsjoberg/ggsankey")
pacman::p_load(tidyverse,
... | /2021/week37/rscript.r | no_license | kayleahaynes/TidyTuesday | R | false | false | 3,989 | r | # description -------------------------------------------------------------
# TidyTuesday week 37 Formula 1
# set up -----------------------------------------------------------------
if(!require(pacman)) install.package("pacman")
devtools::install_github("davidsjoberg/ggsankey")
pacman::p_load(tidyverse,
... |
## CDS.R test case for Tokyo Electric Power Co. Inc.
library(CDS)
## truth1 <- data.frame(TDate = as.Date("2014-04-15"),
## maturity = "5Y",
## contract ="STEC",
## parSpread = round(250.00, digits=2),
## upfront = round(701502, digits=-4... | /pkg/tests/CDS.TokyoElectricPower.test.R | no_license | bdivet/CDS | R | false | false | 1,563 | r | ## CDS.R test case for Tokyo Electric Power Co. Inc.
library(CDS)
## truth1 <- data.frame(TDate = as.Date("2014-04-15"),
## maturity = "5Y",
## contract ="STEC",
## parSpread = round(250.00, digits=2),
## upfront = round(701502, digits=-4... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CentSim2D.R
\name{Idom.numCSup.bnd.tri}
\alias{Idom.numCSup.bnd.tri}
\title{Indicator for an upper bound for the domination number of Central Similarity Proximity Catch Digraph
(CS-PCD) by the exact algorithm - one triangle case}
\usage{
Idom... | /man/Idom.numCSup.bnd.tri.Rd | no_license | elvanceyhan/pcds | R | false | true | 3,056 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CentSim2D.R
\name{Idom.numCSup.bnd.tri}
\alias{Idom.numCSup.bnd.tri}
\title{Indicator for an upper bound for the domination number of Central Similarity Proximity Catch Digraph
(CS-PCD) by the exact algorithm - one triangle case}
\usage{
Idom... |
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/endometrium.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.45,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/endometrium/endometrium_056... | /Model/EN/AvgRank/endometrium/endometrium_056.R | no_license | leon1003/QSMART | R | false | false | 368 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/endometrium.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.45,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/endometrium/endometrium_056... |
## Loading required libraries
library(dplyr)
## Loading data into R session
if (!file.exists("./data"))
{
dir.create("./data")
}
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", "./data/exdata_household_power_consumption.zip")
dataset <- read.csv(... | /plot1.R | no_license | DmitryBaranov1986/ExData_Plotting1 | R | false | false | 991 | r | ## Loading required libraries
library(dplyr)
## Loading data into R session
if (!file.exists("./data"))
{
dir.create("./data")
}
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", "./data/exdata_household_power_consumption.zip")
dataset <- read.csv(... |
#' @title flatten_dimension_all
#'
#' @param data multi-dimensional data to completely flattened/reduced to a single dimension
#'
#' @return data that is flattened to a single dimension
#' @export
#' @import dplyr tidyr purrr furrr
#' @examples
#' # to be added
flatten_dimension_all <- function(data) {
plan(multipro... | /R/flatten_dimension_all.R | permissive | epongpipat/eepR | R | false | false | 854 | r | #' @title flatten_dimension_all
#'
#' @param data multi-dimensional data to completely flattened/reduced to a single dimension
#'
#' @return data that is flattened to a single dimension
#' @export
#' @import dplyr tidyr purrr furrr
#' @examples
#' # to be added
flatten_dimension_all <- function(data) {
plan(multipro... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/diff.R
\name{deletions}
\alias{deletions}
\title{Compute a patch of deletions on a recursive object.}
\usage{
deletions(old_object, new_object)
}
\arguments{
\item{old_object}{ANY. The "before" object.}
\item{new_object}{ANY. The "ne... | /man/deletions.Rd | permissive | kirillseva/objectdiff | R | false | false | 453 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/diff.R
\name{deletions}
\alias{deletions}
\title{Compute a patch of deletions on a recursive object.}
\usage{
deletions(old_object, new_object)
}
\arguments{
\item{old_object}{ANY. The "before" object.}
\item{new_object}{ANY. The "ne... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 53466
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 53466
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_10_14_9.unsat.qdi... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Tentrup/mult-matrix/mult_bool_matrix_10_14_9.unsat/mult_bool_matrix_10_14_9.unsat.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 670 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 53466
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 53466
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_10_14_9.unsat.qdi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UserIdOnly.r
\name{UserIdOnly}
\alias{UserIdOnly}
\title{UserIdOnly Class}
\description{
UserIdOnly Class
UserIdOnly Class
}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{id}}{}
}
\if{html}{\out{</d... | /man/UserIdOnly.Rd | permissive | grepinsight/lookr | R | false | true | 2,650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UserIdOnly.r
\name{UserIdOnly}
\alias{UserIdOnly}
\title{UserIdOnly Class}
\description{
UserIdOnly Class
UserIdOnly Class
}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{id}}{}
}
\if{html}{\out{</d... |
#' Geographical detectors: a one-step function.
#'
#' @description A one-step function for optimal discretization and geographical detectors for
#' multiple variables and visualization.
#'
#' @usage gdm(formula, continuous_variable = NULL, data = NULL, discmethod, discitv)
#' \method{print}{gdm}(x, ...)
#' \method{plot... | /R/gdm.R | no_license | cran/GD | R | false | false | 5,453 | r | #' Geographical detectors: a one-step function.
#'
#' @description A one-step function for optimal discretization and geographical detectors for
#' multiple variables and visualization.
#'
#' @usage gdm(formula, continuous_variable = NULL, data = NULL, discmethod, discitv)
#' \method{print}{gdm}(x, ...)
#' \method{plot... |
setMethod("abs",
signature(x = "db.Rquery"),
function (x)
{
stop("need a definition for the method here")
}
)
| /rwrapper/abs_db.Rquery.R | no_license | walkingsparrow/tests | R | false | false | 135 | r | setMethod("abs",
signature(x = "db.Rquery"),
function (x)
{
stop("need a definition for the method here")
}
)
|
file_read <- function (fileName, ...) {
read.csv(fileName, header = TRUE, stringsAsFactors = FALSE, ...)
}
summarise_data <- function (data) {
rx <- range(data$lnGdpPercap)
subset(data, lnGdpPercap %in% rx)
}
makeFigure <- function (data, lines_data) {
ggplot() +
geom_point(data = data,... | /R/functions.R | no_license | dbarneche/gapminder | R | false | false | 652 | r | file_read <- function (fileName, ...) {
read.csv(fileName, header = TRUE, stringsAsFactors = FALSE, ...)
}
summarise_data <- function (data) {
rx <- range(data$lnGdpPercap)
subset(data, lnGdpPercap %in% rx)
}
makeFigure <- function (data, lines_data) {
ggplot() +
geom_point(data = data,... |
source("utils.R")
source("webapi.R")
# The display option 'Show Raster Overlay' can be enabled by setting the
# enviornment variable "ENABLE_RASTER_OVERLAY" to 'true'
enableRasterOverlay <- as.logical(Sys.getenv("ENABLE_RASTER_OVERLAY", unset = FALSE))
#' Adds an on click listner to a specified layer and
#' trigger... | /shiny-frontend/HeatStressRouting-Frontend/global.R | permissive | biggis-project/path-optimizer | R | false | false | 7,988 | r | source("utils.R")
source("webapi.R")
# The display option 'Show Raster Overlay' can be enabled by setting the
# enviornment variable "ENABLE_RASTER_OVERLAY" to 'true'
enableRasterOverlay <- as.logical(Sys.getenv("ENABLE_RASTER_OVERLAY", unset = FALSE))
#' Adds an on click listner to a specified layer and
#' trigger... |
\name{Goodness of Fit - Coefficient of Variation}
\alias{gofCV}
\title{
Coefficient of Variation.
}
\description{
Calculates and returns goodness of fit - coefficient of variation (CV).
}
\usage{
gofCV(Obs, Prd, dgt=3)
}
\arguments{
\item{Obs}{
Observed or measured values or target vector.
}... | /man/gofCV.Rd | no_license | cran/ehaGoF | R | false | false | 1,353 | rd | \name{Goodness of Fit - Coefficient of Variation}
\alias{gofCV}
\title{
Coefficient of Variation.
}
\description{
Calculates and returns goodness of fit - coefficient of variation (CV).
}
\usage{
gofCV(Obs, Prd, dgt=3)
}
\arguments{
\item{Obs}{
Observed or measured values or target vector.
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/taxtr.R
\name{taxtr}
\alias{taxtr}
\title{convertion of microne ncbi id and ScientificName}
\usage{
taxtr(Input, Type, Level)
}
\arguments{
\item{Input}{a query vector of microbe ncbi ids or ScientificName}
\item{Type}{The Type of Input, sho... | /man/taxtr.Rd | no_license | swcyo/MicrobiomeProfiler | R | false | true | 632 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/taxtr.R
\name{taxtr}
\alias{taxtr}
\title{convertion of microne ncbi id and ScientificName}
\usage{
taxtr(Input, Type, Level)
}
\arguments{
\item{Input}{a query vector of microbe ncbi ids or ScientificName}
\item{Type}{The Type of Input, sho... |
### what is 90% of pi?
almost.pi <- 90/100 * pi
## percents should be escaped neither in inlinedocs, nor in
## Documentation Lists, but will be escaped when written to Rd files.
.result <- list(almost.pi=list(description="what is 90% of pi?",
definition="almost.pi <- 90/100 * pi",
forma... | /inst/testfiles/percent.R | no_license | tdhock/inlinedocs | R | false | false | 362 | r | ### what is 90% of pi?
almost.pi <- 90/100 * pi
## percents should be escaped neither in inlinedocs, nor in
## Documentation Lists, but will be escaped when written to Rd files.
.result <- list(almost.pi=list(description="what is 90% of pi?",
definition="almost.pi <- 90/100 * pi",
forma... |
#August 2015 Reporting Challenge
a<-read.xlsx("db.xlsx")
FeaturesNames<-as.character(a$url)
#calculate summary of domain 1 :tvnewonline.fake
news<-FeaturesNames[grep("http://www.tvnewsonline.fake/news",FeaturesNames)]
music<-FeaturesNames[grep("http://www.tvnewsonline.fake/music",FeaturesNames)]
gallery<-FeaturesName... | /August 2015 Reporting Challenge /August 2015 Reporting Challenge .R | no_license | SankhlaDushyant/Data-analysis | R | false | false | 2,043 | r | #August 2015 Reporting Challenge
a<-read.xlsx("db.xlsx")
FeaturesNames<-as.character(a$url)
#calculate summary of domain 1 :tvnewonline.fake
news<-FeaturesNames[grep("http://www.tvnewsonline.fake/news",FeaturesNames)]
music<-FeaturesNames[grep("http://www.tvnewsonline.fake/music",FeaturesNames)]
gallery<-FeaturesName... |
## svm model s tunanjem hyperparametrov
## odstrani obdobja ko elektrarna ne deluje
## iz nocnih ur vzame samo nekaj nakljucnih ur na dan
library(e1071)
library(xts)
## okolje kjer so funckije
OkoljeFunkcije <- 'C:/Users/Podlogar/Documents/Projekt Elektro/Funkcije'
## okolje kjer so feature matrike (train)
OkoljeFM ... | /03UcenjeModela/Sonce/SVM/svm_model_cistiPodatki_tune.r | no_license | JureP/Napove-elektro | R | false | false | 4,853 | r | ## svm model s tunanjem hyperparametrov
## odstrani obdobja ko elektrarna ne deluje
## iz nocnih ur vzame samo nekaj nakljucnih ur na dan
library(e1071)
library(xts)
## okolje kjer so funckije
OkoljeFunkcije <- 'C:/Users/Podlogar/Documents/Projekt Elektro/Funkcije'
## okolje kjer so feature matrike (train)
OkoljeFM ... |
# a quick script template for reading in the files produced by the nest_read.py script
# by Drew Hill, UC Berkeley
# June 2016
# bash command to transfer file from RasPi
# scp lawson@192.168.29.157:~/nest_datalog.txt ~/Desktop
library(data.table)
library(plyr)
library(lubridate)
filename <- "~/Dropbox/Aerie/Nest Pro... | /Nest Protect as PM25 Monitor/Code drafting/R Code/read_nest_log_v2.R | no_license | drew-hill/dissertation | R | false | false | 1,744 | r | # a quick script template for reading in the files produced by the nest_read.py script
# by Drew Hill, UC Berkeley
# June 2016
# bash command to transfer file from RasPi
# scp lawson@192.168.29.157:~/nest_datalog.txt ~/Desktop
library(data.table)
library(plyr)
library(lubridate)
filename <- "~/Dropbox/Aerie/Nest Pro... |
# Code for load data file and subset the properly data
dat <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.string="?")
dat <- subset(dat, Date=="1/2/2007" | Date=="2/2/2007")
DateTime <- as.POSIXct(paste(dat$Date, dat$Time), format = "%d/%m/%Y %H:%M:%S")
dat <- cbind(dat, DateTime)
# Instruc... | /plot1.R | no_license | Luis-A/ExData_Plotting1 | R | false | false | 536 | r |
# Code for load data file and subset the properly data
dat <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.string="?")
dat <- subset(dat, Date=="1/2/2007" | Date=="2/2/2007")
DateTime <- as.POSIXct(paste(dat$Date, dat$Time), format = "%d/%m/%Y %H:%M:%S")
dat <- cbind(dat, DateTime)
# Instruc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eodplot.R
\name{findLandmarks}
\alias{findLandmarks}
\title{Plot EOD signal with landmarks}
\usage{
findLandmarks(plotdata)
}
\arguments{
\item{plotdata}{The EOD matrix from getEODMatrix}
}
\description{
Plot EOD signal with landmarks
}
| /man/findLandmarks.Rd | no_license | jasongallant/eodplotter | R | false | true | 315 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eodplot.R
\name{findLandmarks}
\alias{findLandmarks}
\title{Plot EOD signal with landmarks}
\usage{
findLandmarks(plotdata)
}
\arguments{
\item{plotdata}{The EOD matrix from getEODMatrix}
}
\description{
Plot EOD signal with landmarks
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rice.R
\name{generate_passphrase}
\alias{generate_passphrase}
\title{Generates a passphrase}
\usage{
generate_passphrase(tokens = generate_token(7), verbose = TRUE, ...)
}
\arguments{
\item{tokens}{a vector of character representing the token... | /man/generate_passphrase.Rd | no_license | fmichonneau/riceware | R | false | true | 1,154 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rice.R
\name{generate_passphrase}
\alias{generate_passphrase}
\title{Generates a passphrase}
\usage{
generate_passphrase(tokens = generate_token(7), verbose = TRUE, ...)
}
\arguments{
\item{tokens}{a vector of character representing the token... |
# Second test of update B
# Create the Phi matrix using the code from the SSGL package example
library(Rcpp)
library(RcppArmadillo)
library(MASS)
library(splines)
set.seed(129)
n <- 100
p <- 200
X_raw <- matrix(runif(n*p, 0,1), nrow = n, ncol= p)
D <- 2
Phi <- array(dim = c(n, D, p))
for(j in 1:p){
splineTemp <- ... | /testing_scripts/scripts/test_updateB2.R | no_license | skdeshpande91/GAM_SSL_SSGL | R | false | false | 1,537 | r | # Second test of update B
# Create the Phi matrix using the code from the SSGL package example
library(Rcpp)
library(RcppArmadillo)
library(MASS)
library(splines)
set.seed(129)
n <- 100
p <- 200
X_raw <- matrix(runif(n*p, 0,1), nrow = n, ncol= p)
D <- 2
Phi <- array(dim = c(n, D, p))
for(j in 1:p){
splineTemp <- ... |
#' Print Method for Evaluation of Covariate-Adaptive Randomization
#'
#' Prints the parameters of a covariate-adaptive randomization procedures
#'
#' @export
#' @rdname print
#' @method print careval
#' @param x objects of class\code{careval}.
#' @param digits number of significant digits to be used.
#' @par... | /caratOMP/R/careval.R | no_license | zhenxuanzhang/carat | R | false | false | 2,899 | r | #' Print Method for Evaluation of Covariate-Adaptive Randomization
#'
#' Prints the parameters of a covariate-adaptive randomization procedures
#'
#' @export
#' @rdname print
#' @method print careval
#' @param x objects of class\code{careval}.
#' @param digits number of significant digits to be used.
#' @par... |
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615827487-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 487 | r | testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... |
library(R.utils)
### Name: Options
### Title: The Options class
### Aliases: Options
### Keywords: classes programming
### ** Examples
local <- Options()
# Query a missing option
cex <- getOption(local, "graphics/cex")
cat("graphics/cex =", cex, "\n") # Returns NULL
# Query a missing option with default value
ce... | /data/genthat_extracted_code/R.utils/examples/Options.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,288 | r | library(R.utils)
### Name: Options
### Title: The Options class
### Aliases: Options
### Keywords: classes programming
### ** Examples
local <- Options()
# Query a missing option
cex <- getOption(local, "graphics/cex")
cat("graphics/cex =", cex, "\n") # Returns NULL
# Query a missing option with default value
ce... |
### link CSC to GDP_PM25
link_CSC <- function(GDP_PM25){
library(dplyr)
source("code/Functions/readCSC.R")
CSC <- readCSC()
load("RData/GDP_PM25.RData")
GDP_PM25_CSC <- left_join(GDP_PM25,CSC,by=c("Country.Code","Year"="time"),suffix=c("","_CSC"))
### check matching result
print(wi... | /Functions/link_CSC.R | no_license | Danny1127/Pollution_Growth | R | false | false | 473 | r | ### link CSC to GDP_PM25
link_CSC <- function(GDP_PM25){
library(dplyr)
source("code/Functions/readCSC.R")
CSC <- readCSC()
load("RData/GDP_PM25.RData")
GDP_PM25_CSC <- left_join(GDP_PM25,CSC,by=c("Country.Code","Year"="time"),suffix=c("","_CSC"))
### check matching result
print(wi... |
\name{FTR.makeBidLimits}
\alias{FTR.makeBidLimits}
\title{Create the max and min bid price for a set of paths.}
\description{Create the max and min bid price for a set of paths. It
compares the monthly settle prices and monthly cleared prices for the
past ... auctions, and has a simple algo built in. This is sup... | /R Extension/RMG/Utilities/Interfaces/FTR/man/FTR.makeBidLimits.Rd | no_license | uhasan1/QLExtension-backup | R | false | false | 1,958 | rd | \name{FTR.makeBidLimits}
\alias{FTR.makeBidLimits}
\title{Create the max and min bid price for a set of paths.}
\description{Create the max and min bid price for a set of paths. It
compares the monthly settle prices and monthly cleared prices for the
past ... auctions, and has a simple algo built in. This is sup... |
library(dplyr, warn.conflicts = FALSE)
# Download 2016 Plan selections by ZIP Code for the 38 states -------------
# Source: https://aspe.hhs.gov/basic-report/plan-selections-zip-code-and-county-health-insurance-marketplace-march-2016
# (November 1, 2015 – February 1, 2016), including SEP activity through Feb. 22, 201... | /data-raw/prep_enrollment2016.R | no_license | wander99/qhp | R | false | false | 2,006 | r | library(dplyr, warn.conflicts = FALSE)
# Download 2016 Plan selections by ZIP Code for the 38 states -------------
# Source: https://aspe.hhs.gov/basic-report/plan-selections-zip-code-and-county-health-insurance-marketplace-march-2016
# (November 1, 2015 – February 1, 2016), including SEP activity through Feb. 22, 201... |
## Initialize inverse as NULL during the start and whenever the matrix is changed
## set(y) creates a new matrix
## get() retrieves the matrix
## set(inv) sets the inverse of the matrix
## getinv() retrieves the inverse of the matrix
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {... | /cachematrix.R | no_license | mitenshah/ProgrammingAssignment2 | R | false | false | 933 | r | ## Initialize inverse as NULL during the start and whenever the matrix is changed
## set(y) creates a new matrix
## get() retrieves the matrix
## set(inv) sets the inverse of the matrix
## getinv() retrieves the inverse of the matrix
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {... |
## Script for building the plot of energy sub metering vs time
## 1. Read the data file
DT <- fread("../household_power_consumption.txt", na.strings = c("?"))
##Get the two-month subset of the data
DTs <- subset(DT, Date=="1/2/2007" | Date == "2/2/2007")
## Concatenate the data in the Date and Time columns
datetime <... | /Plot3.R | no_license | Aytakatya/ExData_Plotting1 | R | false | false | 1,085 | r | ## Script for building the plot of energy sub metering vs time
## 1. Read the data file
DT <- fread("../household_power_consumption.txt", na.strings = c("?"))
##Get the two-month subset of the data
DTs <- subset(DT, Date=="1/2/2007" | Date == "2/2/2007")
## Concatenate the data in the Date and Time columns
datetime <... |
library(gtools)
library(tidyverse)
df1 <- read.csv2(file = "janeiro-2018.csv")
df2 <- read.csv2(file = "fevereiro-2018.csv")
df3 = smartbind(df1, df2) #junta verticalmente duas ou mais tabelas
write.csv(df3, file = "jan-fev-2018.csv")
| /scripts/empilhar_tabelas.R | permissive | herbertizidro/r_scripts | R | false | false | 236 | r | library(gtools)
library(tidyverse)
df1 <- read.csv2(file = "janeiro-2018.csv")
df2 <- read.csv2(file = "fevereiro-2018.csv")
df3 = smartbind(df1, df2) #junta verticalmente duas ou mais tabelas
write.csv(df3, file = "jan-fev-2018.csv")
|
#' Calculate mutual information between vectors
#'
#' @param x,y Vectors to be compared using mutual information.
#' @param mitype Type of mutual information estimator to be used. See details.
#' @param minorm Should mutual information be normalized? See details.
#' @param autoswitch If KDE fails, should estimator be s... | /R/mi_vector.R | no_license | crodriguez-saltos/misound | R | false | false | 2,175 | r | #' Calculate mutual information between vectors
#'
#' @param x,y Vectors to be compared using mutual information.
#' @param mitype Type of mutual information estimator to be used. See details.
#' @param minorm Should mutual information be normalized? See details.
#' @param autoswitch If KDE fails, should estimator be s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/last.R
\name{last}
\alias{last}
\title{A letter counting function}
\usage{
last(x)
}
\arguments{
\item{which}{string would you like to count the letters of}
}
\description{
This function counts letters
}
\examples{
last()
}
\keyword{count}
\k... | /man/last.Rd | no_license | louischaman/Rstartup | R | false | true | 335 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/last.R
\name{last}
\alias{last}
\title{A letter counting function}
\usage{
last(x)
}
\arguments{
\item{which}{string would you like to count the letters of}
}
\description{
This function counts letters
}
\examples{
last()
}
\keyword{count}
\k... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_215}
\alias{movie_215}
\title{The Distinguished Gentleman}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0... | /man/movie_215.Rd | permissive | kjhealy/networkdata | R | false | true | 1,035 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_215}
\alias{movie_215}
\title{The Distinguished Gentleman}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0... |
#Regression Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
#library(caTools)
#set.seed(123)
#split = sample.split(dataset$DependentVariable, SplitRatio = 0.8)
#tra... | /Machine Learning Template Folder/Part 2 - Regression/Polynomial Regression/regression_template.R | no_license | lionadis/Data-Science | R | false | false | 1,470 | r | #Regression Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
#library(caTools)
#set.seed(123)
#split = sample.split(dataset$DependentVariable, SplitRatio = 0.8)
#tra... |
library(discreteRV)
### Name: rsim
### Title: Simulate n independent trials from a random variable X:
### Aliases: rsim
### ** Examples
X.Bern <- RV(c(1,0), c(.5,.5))
X.Bern.sim100 <- rsim(X.Bern, 100)
X.loaded.die <- RV(1:6, odds = c(1,1,1,1,2,4))
X.loaded.die.sim100 <- rsim(X.loaded.die, 100)
# The function 'rs... | /data/genthat_extracted_code/discreteRV/examples/rsim.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 487 | r | library(discreteRV)
### Name: rsim
### Title: Simulate n independent trials from a random variable X:
### Aliases: rsim
### ** Examples
X.Bern <- RV(c(1,0), c(.5,.5))
X.Bern.sim100 <- rsim(X.Bern, 100)
X.loaded.die <- RV(1:6, odds = c(1,1,1,1,2,4))
X.loaded.die.sim100 <- rsim(X.loaded.die, 100)
# The function 'rs... |
melanomendata <- function(directory) {
if (directory == "MelanomenData") {
setwd("/Users/lukas/Documents/Uni Maas/Medicine/Jaar 6/Onderzoek_Dermatologie/MelanomenData/")
library(gdata)
library(plyr)
print("Getting the results of the 2015-2016 Databases")
melanomen2015 <- read.xls("2015.xlsx", ... | /MDataBase.R | no_license | Lukas2010/accesstime_public_hospital | R | false | false | 5,095 | r | melanomendata <- function(directory) {
if (directory == "MelanomenData") {
setwd("/Users/lukas/Documents/Uni Maas/Medicine/Jaar 6/Onderzoek_Dermatologie/MelanomenData/")
library(gdata)
library(plyr)
print("Getting the results of the 2015-2016 Databases")
melanomen2015 <- read.xls("2015.xlsx", ... |
# Exercise 1: calling built-in functions
# Create a variable `my_name` that contains your name
my_name <- "Emily"
# Create a variable `name_length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name_length <- nchar("Emily")
# Print the number of letters in your name
p... | /exercise-1/exercise.R | permissive | aemelialialia/ch6-functions | R | false | false | 1,399 | r | # Exercise 1: calling built-in functions
# Create a variable `my_name` that contains your name
my_name <- "Emily"
# Create a variable `name_length` that holds how many letters (including spaces)
# are in your name (use the `nchar()` function)
name_length <- nchar("Emily")
# Print the number of letters in your name
p... |
seedChangeEval =
function(code, envir = globalenv(), verbose = TRUE, ...)
{
if(is.character(code)) {
if(file.exists(code))
code = parse(code)
else
code = parse(text = code)
}
if(!is.language(code) || is.call(code))
stop("need a language object")
names... | /R/seedChangeEval.R | no_license | duncantl/CallCounter | R | false | false | 878 | r | seedChangeEval =
function(code, envir = globalenv(), verbose = TRUE, ...)
{
if(is.character(code)) {
if(file.exists(code))
code = parse(code)
else
code = parse(text = code)
}
if(!is.language(code) || is.call(code))
stop("need a language object")
names... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BP_pred_MGWRSAR.R
\name{BP_pred_MGWRSAR}
\alias{BP_pred_MGWRSAR}
\title{BP_pred_MGWRSAR
to be documented}
\usage{
BP_pred_MGWRSAR(YS,X,W,e,beta_hat,lambda_hat,S,O,coord,type='BPN',k=16,Wk=NULL)
}
\arguments{
\item{YS}{to be documented}
\item... | /man/BP_pred_MGWRSAR.Rd | no_license | shepherdmeng/mgwrsar | R | false | true | 743 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BP_pred_MGWRSAR.R
\name{BP_pred_MGWRSAR}
\alias{BP_pred_MGWRSAR}
\title{BP_pred_MGWRSAR
to be documented}
\usage{
BP_pred_MGWRSAR(YS,X,W,e,beta_hat,lambda_hat,S,O,coord,type='BPN',k=16,Wk=NULL)
}
\arguments{
\item{YS}{to be documented}
\item... |
# Load the package (after installation, see above).
library(GenSA) # GenSA is better than optimx (although somewhat slower)
library(FD) # for FD::maxent() (make sure this is up-to-date)
library(snow) # (if you want to use multicore functionality; some systems/R versions prefer library(parallel), try eithe... | /inst/extdata/examples/check_strat5_ML/M0/script_v1.R | no_license | nmatzke/BioGeoBEARS | R | false | false | 22,121 | r |
# Load the package (after installation, see above).
library(GenSA) # GenSA is better than optimx (although somewhat slower)
library(FD) # for FD::maxent() (make sure this is up-to-date)
library(snow) # (if you want to use multicore functionality; some systems/R versions prefer library(parallel), try eithe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_double_tanh}
\alias{simulate_double_tanh}
\title{Simulate data according to the dht model}
\usage{
simulate_double_tanh(z, n_groups, sigma2_y, mu_alpha, sigma2_alpha,
mu_beta, sigma2_beta)
}
\arguments{
\item{z}{De... | /dhtdensity/man/simulate_double_tanh.Rd | no_license | connor-duffin/dhtdensity | R | false | true | 774 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_double_tanh}
\alias{simulate_double_tanh}
\title{Simulate data according to the dht model}
\usage{
simulate_double_tanh(z, n_groups, sigma2_y, mu_alpha, sigma2_alpha,
mu_beta, sigma2_beta)
}
\arguments{
\item{z}{De... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rdataretriever.R
\name{install_retriever}
\alias{install_retriever}
\title{install the python module `retriever`}
\usage{
install_retriever(method = "auto", conda = "auto")
}
\arguments{
\item{method}{Installation method. By default, "auto" a... | /man/install_retriever.Rd | permissive | fboehm/rdataretriever | R | false | true | 771 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rdataretriever.R
\name{install_retriever}
\alias{install_retriever}
\title{install the python module `retriever`}
\usage{
install_retriever(method = "auto", conda = "auto")
}
\arguments{
\item{method}{Installation method. By default, "auto" a... |
if (1==0) {
# # HOW TO PLOT WEIGHTED HISTOGRAMS, OVERLAID 1 DEMOG GROUP VS ALL OTHERS:
#
# # ALSO SEE 'https://medium.com/@nickmartin812/how-to-r-visualizing-distributions-49ea4141fb32'
# # for overlapping boxplots or density plots (pdf), not histograms.
# # and ggridges:: package
# # and maybe https://p... | /R/pop.cdf2-and-density-notes-OVERLAY-2-WTD-HISTOS.R | no_license | ejanalysis/ejanalysis | R | false | false | 2,546 | r | if (1==0) {
# # HOW TO PLOT WEIGHTED HISTOGRAMS, OVERLAID 1 DEMOG GROUP VS ALL OTHERS:
#
# # ALSO SEE 'https://medium.com/@nickmartin812/how-to-r-visualizing-distributions-49ea4141fb32'
# # for overlapping boxplots or density plots (pdf), not histograms.
# # and ggridges:: package
# # and maybe https://p... |
source("complete.R")
corr <- function(directory, threshold=0) {
correlations <- 0
compl <- complete(directory)
nobs <- compl$nobs
ids <- compl$id
true <- nobs>threshold
use <- ids[true]
for (i in use) {
if (i<10) {
id <- toString(i)
fname <- paste(directory, "/00", id, ".csv", sep="")
}
else if (i... | /rprogramming/assign1/corr.R | no_license | NormanBenbrahim/datasciencecoursera | R | false | false | 728 | r | source("complete.R")
corr <- function(directory, threshold=0) {
correlations <- 0
compl <- complete(directory)
nobs <- compl$nobs
ids <- compl$id
true <- nobs>threshold
use <- ids[true]
for (i in use) {
if (i<10) {
id <- toString(i)
fname <- paste(directory, "/00", id, ".csv", sep="")
}
else if (i... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.R
\name{files_to_rebuild}
\alias{files_to_rebuild}
\title{Figure out which files need to be rebuilt}
\usage{
files_to_rebuild(files)
}
\arguments{
\item{files}{A character vector of paths to source files (e.g., \code{.Rmd}).}
}
\value{
... | /man/files_to_rebuild.Rd | permissive | jonathan-g/blogdownDigest | R | false | true | 756 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.R
\name{files_to_rebuild}
\alias{files_to_rebuild}
\title{Figure out which files need to be rebuilt}
\usage{
files_to_rebuild(files)
}
\arguments{
\item{files}{A character vector of paths to source files (e.g., \code{.Rmd}).}
}
\value{
... |
#' This function updates an existing doc
#'
#' This essentially means that a
#' revision, corresponding to the '_id' has to be provided. If no '_rev' is
#' given in the \code{cdb} list the function gets the doc from the db
#' and takes the rev number for the update
#'
#' Updating a doc at couchdb means executing a http... | /R4CouchDB/R/cdbUpdateDoc.R | no_license | ingted/R-Examples | R | false | false | 2,662 | r | #' This function updates an existing doc
#'
#' This essentially means that a
#' revision, corresponding to the '_id' has to be provided. If no '_rev' is
#' given in the \code{cdb} list the function gets the doc from the db
#' and takes the rev number for the update
#'
#' Updating a doc at couchdb means executing a http... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GenEval.R
\name{mkPED}
\alias{mkPED}
\title{Pedigree relationship matrix}
\usage{
mkPED(pop.info)
}
\arguments{
\item{pop.info}{The population info, in the same format generated by \code{simPopInfo}.}
}
\value{
The pedigree relationship matri... | /man/mkPED.Rd | no_license | bcuyabano/GenEval | R | false | true | 720 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GenEval.R
\name{mkPED}
\alias{mkPED}
\title{Pedigree relationship matrix}
\usage{
mkPED(pop.info)
}
\arguments{
\item{pop.info}{The population info, in the same format generated by \code{simPopInfo}.}
}
\value{
The pedigree relationship matri... |
library(ggplot2)
barras_urbanos<-ggplot(data=asentamiento_urbano_df, aes(x=reorder(estado, -asentamientos), y=asentamientos)) +
labs(title = "ASENTAMIENTOS URBANOS") +
xlab("Estados") +
ylab("Asentamientos") +
geom_bar(stat="sum", fill = "steelblue") +
geom_text(aes(label=asentamientos), angle = 45) +
them... | /graficos-asentamientos.r | permissive | mmdelc/r-cp-mx | R | false | false | 1,303 | r | library(ggplot2)
barras_urbanos<-ggplot(data=asentamiento_urbano_df, aes(x=reorder(estado, -asentamientos), y=asentamientos)) +
labs(title = "ASENTAMIENTOS URBANOS") +
xlab("Estados") +
ylab("Asentamientos") +
geom_bar(stat="sum", fill = "steelblue") +
geom_text(aes(label=asentamientos), angle = 45) +
them... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.