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(microbenchmark)
# lapply
lapply(1:3, function(x) c(x, x^2, x^3))
lapply(1:3/3, round, digits=3)
# parallel applys
library(parallel)
(no_cores = detectCores() - 1)
#The parallel package is basically about doing the above in parallel.
#The main difference is that we need to start with setting up a cluster, a ... | /1204.R | no_license | lloydliu717/discussion-1204 | R | false | false | 2,284 | r | library(microbenchmark)
# lapply
lapply(1:3, function(x) c(x, x^2, x^3))
lapply(1:3/3, round, digits=3)
# parallel applys
library(parallel)
(no_cores = detectCores() - 1)
#The parallel package is basically about doing the above in parallel.
#The main difference is that we need to start with setting up a cluster, a ... |
rm(list=ls())
source(file = "Infrastructure/ViewJags.R")
sh <- shinyObject( "Probabilidad")
#list.files("temp/", pattern = "\\.rds$")
shinyApp(sh$ui, sh$server)
| /density/view.R | no_license | ScJavier/Inferencia_distribuciones_Shiny | R | false | false | 164 | r | rm(list=ls())
source(file = "Infrastructure/ViewJags.R")
sh <- shinyObject( "Probabilidad")
#list.files("temp/", pattern = "\\.rds$")
shinyApp(sh$ui, sh$server)
|
# ------------------
# Main script for TRES IPM
# Includes calls to run Init, (#)LTRE, and (#)Visualization Scripts
# Running all as-is will read in data, run JAGS model, and summarize output
# Uncomment source() calls for either LTRE runs or visualization runs
#
# OUTPUT
# ipm -- full JAGS ipm posterior from ipm... | /Scripts/Run_TRES.R | no_license | ltaylor2/TRES_IPM | R | false | false | 3,482 | r | # ------------------
# Main script for TRES IPM
# Includes calls to run Init, (#)LTRE, and (#)Visualization Scripts
# Running all as-is will read in data, run JAGS model, and summarize output
# Uncomment source() calls for either LTRE runs or visualization runs
#
# OUTPUT
# ipm -- full JAGS ipm posterior from ipm... |
## 유닛 테스팅을 위한 패키지
install.packages("testthat")
library(testthat)
## expect 함수들
#유닛 테스팅은 작성한 코드에 어떤 입력을 주었을 때 예상되는 출력이 실제로 반환되는지 확인하는 것을 기본으로 한다. 기댓값과 실제 반환 값을 비교하기 위해 사용하는 함수의 일부를 다음 표에 정리했다.
a <- 1:3
b <- 1:3
expect_equal(a, b)
expect_equivalent(a, b)
names(a) <- c('a', 'b', 'c')
expect_equal(a, b) # 벡터에 부여한 ... | /Practice in Analytic with R.R | no_license | bhjo0930/adp | R | false | false | 4,092 | r | ## 유닛 테스팅을 위한 패키지
install.packages("testthat")
library(testthat)
## expect 함수들
#유닛 테스팅은 작성한 코드에 어떤 입력을 주었을 때 예상되는 출력이 실제로 반환되는지 확인하는 것을 기본으로 한다. 기댓값과 실제 반환 값을 비교하기 위해 사용하는 함수의 일부를 다음 표에 정리했다.
a <- 1:3
b <- 1:3
expect_equal(a, b)
expect_equivalent(a, b)
names(a) <- c('a', 'b', 'c')
expect_equal(a, b) # 벡터에 부여한 ... |
# Modified version of LSMI #
# Should include:
# -balanced classes base function selection
# -'feature space covering technique' base function selection
# -???
#########################
# Implementaton of LSMI #
#########################
# close to classical implementation, but more changes than in 'vanilla' script:
... | /lsmi - method/LSMI_extra.R | no_license | dwisp/masters_degree | R | false | false | 12,917 | r | # Modified version of LSMI #
# Should include:
# -balanced classes base function selection
# -'feature space covering technique' base function selection
# -???
#########################
# Implementaton of LSMI #
#########################
# close to classical implementation, but more changes than in 'vanilla' script:
... |
#########################################################
#
# plotSpeciesRatesThroughTime <- function(...)
#
# Function to plot several species-specific rate trajectories together
#
# start.time = time before present (defaults to full depth of tree)
# useMedian = boolean, will plot median if TRUE, mean if FALSE
# nbrea... | /Rcode/devel_BAMMtools/plotSpeciesRatesThroughTime.R | no_license | macroevolution/bammtools | R | false | false | 4,016 | r | #########################################################
#
# plotSpeciesRatesThroughTime <- function(...)
#
# Function to plot several species-specific rate trajectories together
#
# start.time = time before present (defaults to full depth of tree)
# useMedian = boolean, will plot median if TRUE, mean if FALSE
# nbrea... |
read.merge.AN.data <- function( rxn.jsn.file = 'data/abridge-news-reactions-export.json',
tpc.jsn.file = 'data/abridge-news-topics-export (1).json'){
`%ni%` <- Negate(`%in%`)
## ======================================== ##
## read in reaction data
## ===========================... | /R/merge_AN_data.R | no_license | lhenneman/OpinionReport | R | false | false | 4,956 | r |
read.merge.AN.data <- function( rxn.jsn.file = 'data/abridge-news-reactions-export.json',
tpc.jsn.file = 'data/abridge-news-topics-export (1).json'){
`%ni%` <- Negate(`%in%`)
## ======================================== ##
## read in reaction data
## ===========================... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotEffNsGG.R
\name{plotEffNsGG}
\alias{plotEffNsGG}
\title{Plot input and estimated sample sizes from size frequency fits}
\usage{
plotEffNsGG(fits, mc, sxs = c(mc$dims$x$nms, "ALL SEX"),
mss = c(mc$dims$m$nms, "ALL MATURITY"), scs = c(mc$... | /man/plotEffNsGG.Rd | permissive | wStockhausen/rTCSAM2015 | R | false | true | 1,006 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotEffNsGG.R
\name{plotEffNsGG}
\alias{plotEffNsGG}
\title{Plot input and estimated sample sizes from size frequency fits}
\usage{
plotEffNsGG(fits, mc, sxs = c(mc$dims$x$nms, "ALL SEX"),
mss = c(mc$dims$m$nms, "ALL MATURITY"), scs = c(mc$... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 22447
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 16355
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 16355
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/dungeon/dungeon_i10-m5-u10-v0.pddl_planlen=40/dungeon_i10-m5-u10-v0.pddl_planlen=40.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 30,390 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 22447
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 16355
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 16355
c
c Input Parameter (command line, ... |
## TITLE: Extraction & Manipulation of Responsibility Matrix Dataset
## AUTHOR: Femi Akinmade (qlx6@cdc.gov)
## DESCRIPTION:
## Extraction and tidying SID df for SIDs dashboard 2.0
## CREATION DATE: 11/23/2021
library(readxl)
library(tidyverse)
library(openxlsx)
library(dplyr)
rm(list = ls())
#s... | /sid_sid_extraction_v5.R | no_license | ICPI/HSS-KP | R | false | false | 26,919 | r |
## TITLE: Extraction & Manipulation of Responsibility Matrix Dataset
## AUTHOR: Femi Akinmade (qlx6@cdc.gov)
## DESCRIPTION:
## Extraction and tidying SID df for SIDs dashboard 2.0
## CREATION DATE: 11/23/2021
library(readxl)
library(tidyverse)
library(openxlsx)
library(dplyr)
rm(list = ls())
#s... |
\name{GSAgm-package}
\alias{GSAgm-package}
\alias{GSAgm}
\docType{package}
\title{GSAgm package}
\description{
This package runs gene set analyses on SNP and RNA data. See
individual functions for details.
}
\details{
\tabular{ll}{
Package: \tab GSAgm\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2013-... | /man/GSAgm-package.Rd | no_license | cran/GSAgm | R | false | false | 1,308 | rd | \name{GSAgm-package}
\alias{GSAgm-package}
\alias{GSAgm}
\docType{package}
\title{GSAgm package}
\description{
This package runs gene set analyses on SNP and RNA data. See
individual functions for details.
}
\details{
\tabular{ll}{
Package: \tab GSAgm\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2013-... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810623932137e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual... | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615831895-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810623932137e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-cache.R
\name{cache_by_expression}
\alias{cache_by_expression}
\title{Cache text}
\usage{
cache_by_expression(text, transformers)
}
\arguments{
\item{text}{A character vector with one or more expressions.}
\item{transformers}{The trans... | /man/cache_by_expression.Rd | no_license | jb388/styler | R | false | true | 514 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-cache.R
\name{cache_by_expression}
\alias{cache_by_expression}
\title{Cache text}
\usage{
cache_by_expression(text, transformers)
}
\arguments{
\item{text}{A character vector with one or more expressions.}
\item{transformers}{The trans... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/uStats.R
\name{uStat11.diff}
\alias{uStat11.diff}
\title{Create the kernel and design matrices for uStat11}
\usage{
uStat11.diff(
df.input,
modalitiesToCompare,
keyColumns = c("readerID", "caseID", "modalityID", "score")
)
}
\arguments{... | /man/uStat11.diff.Rd | no_license | cran/iMRMC | R | false | true | 601 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/uStats.R
\name{uStat11.diff}
\alias{uStat11.diff}
\title{Create the kernel and design matrices for uStat11}
\usage{
uStat11.diff(
df.input,
modalitiesToCompare,
keyColumns = c("readerID", "caseID", "modalityID", "score")
)
}
\arguments{... |
#' Get t-statistics from limma objects
#'
#' Get the t-statistics from a [lmFit][limma::lmFit] object.
#'
#' @param lmFitObj A [lmFit][limma::lmFit] object.
#' @param coiIndex An integer specifying the coefficent of interest in the model
#' for which to get the t-statistics for.
#'
#' @return A two column matrix with t... | /R/getT.R | no_license | KrotosBenjamin/jaffelab | R | false | false | 1,320 | r | #' Get t-statistics from limma objects
#'
#' Get the t-statistics from a [lmFit][limma::lmFit] object.
#'
#' @param lmFitObj A [lmFit][limma::lmFit] object.
#' @param coiIndex An integer specifying the coefficent of interest in the model
#' for which to get the t-statistics for.
#'
#' @return A two column matrix with t... |
\name{betaspendf}
\alias{betaspendf}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{The default beta spending function
%% ~~function to do ... ~~
}
\description{The default beta spending function
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
betaspend... | /man/betaspendf.Rd | no_license | cran/seqmon | R | false | false | 632 | rd | \name{betaspendf}
\alias{betaspendf}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{The default beta spending function
%% ~~function to do ... ~~
}
\description{The default beta spending function
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
betaspend... |
#' Perform topic modeling on a corpus
#'
#' @param corp A corpus object
#' @param dfm_subset A logical expression indicating elements to keep: missing values are taken as false
#' @param num_topics The number of topics to return
#' @param num_ngrams The phrase length to
#' @param ... Additional options passed... | /R/get_topics.R | no_license | clawilso15/Text.Replace | R | false | false | 1,694 | r | #' Perform topic modeling on a corpus
#'
#' @param corp A corpus object
#' @param dfm_subset A logical expression indicating elements to keep: missing values are taken as false
#' @param num_topics The number of topics to return
#' @param num_ngrams The phrase length to
#' @param ... Additional options passed... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scone_wrap.R
\name{scone_easybake}
\alias{scone_easybake}
\title{Wrapper for Running Essential SCONE Modules}
\usage{
scone_easybake(expr, qc, bio = NULL, batch = NULL, negcon = NULL,
verbose = c("0", "1", "2"), out_dir = getwd(), seed = 11... | /man/scone_easybake.Rd | no_license | ckmah/scone | R | false | true | 5,230 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scone_wrap.R
\name{scone_easybake}
\alias{scone_easybake}
\title{Wrapper for Running Essential SCONE Modules}
\usage{
scone_easybake(expr, qc, bio = NULL, batch = NULL, negcon = NULL,
verbose = c("0", "1", "2"), out_dir = getwd(), seed = 11... |
# Code written by Karthik Joshi
# for ETF3231/5231
# Student number 29416000
# packages included
library(fpp2)
library(dplyr)
library(readxl)
#-----------------------------------Assignment 2-------------------------------------
# reading in my data and plotting
#Q1
Retail=read_xlsx("RetailDataIndividual.xlsx",sk... | /Arima Vs ETS/forecasting.R | no_license | Joshi-Karthik/Time-series-models | R | false | false | 9,381 | r | # Code written by Karthik Joshi
# for ETF3231/5231
# Student number 29416000
# packages included
library(fpp2)
library(dplyr)
library(readxl)
#-----------------------------------Assignment 2-------------------------------------
# reading in my data and plotting
#Q1
Retail=read_xlsx("RetailDataIndividual.xlsx",sk... |
library(oro.nifti)
### Name: afni-class
### Title: Class "afni"
### Aliases: afni-class show,afni-method
### Keywords: classes
### ** Examples
showClass("afni")
| /data/genthat_extracted_code/oro.nifti/examples/afni-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 169 | r | library(oro.nifti)
### Name: afni-class
### Title: Class "afni"
### Aliases: afni-class show,afni-method
### Keywords: classes
### ** Examples
showClass("afni")
|
expand_preds <- function (.data, threshold, inc = NULL) {
threshold <- unique(threshold)
nth <- length(threshold)
n_data <- nrow(.data)
if (!is.null(inc))
.data <- dplyr::select(.data, all_of(inc))
.data <- .data[rep(1:nrow(.data), times = nth), ]
.data$.threshold <- rep(threshold, each = n_data)
.dat... | /R/utils.R | permissive | seanrmeyer/runway | R | false | false | 849 | r | expand_preds <- function (.data, threshold, inc = NULL) {
threshold <- unique(threshold)
nth <- length(threshold)
n_data <- nrow(.data)
if (!is.null(inc))
.data <- dplyr::select(.data, all_of(inc))
.data <- .data[rep(1:nrow(.data), times = nth), ]
.data$.threshold <- rep(threshold, each = n_data)
.dat... |
## version: 1.35
## method: get
## path: /nodes/{id}
## code: 200
NULL
## NOTE: the sample response for this version is incorrect, with TLS
## in the wrong place and so I've updated the json
tls_info <- list(
trust_root = "-----BEGIN CERTIFICATE-----\nMIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw\... | /tests/testthat/sample_responses/v1.35/node_inspect.R | no_license | cran/stevedore | R | false | false | 2,814 | r | ## version: 1.35
## method: get
## path: /nodes/{id}
## code: 200
NULL
## NOTE: the sample response for this version is incorrect, with TLS
## in the wrong place and so I've updated the json
tls_info <- list(
trust_root = "-----BEGIN CERTIFICATE-----\nMIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw\... |
#' Randomly sample survey responses
#'
#' @param df A dataframe object with
#' @param text_col The column with each response per row
#' @param n The number of responses to sample
#'
#' @description This
#'
#' @return A vector of sampled comments from the supplied dataframe.
#' @export
#'
#' @examples
#' \dontrun{
#' d... | /R/response_sampler.R | no_license | clawilso15/Text.Replace | R | false | false | 632 | r | #' Randomly sample survey responses
#'
#' @param df A dataframe object with
#' @param text_col The column with each response per row
#' @param n The number of responses to sample
#'
#' @description This
#'
#' @return A vector of sampled comments from the supplied dataframe.
#' @export
#'
#' @examples
#' \dontrun{
#' d... |
# 분류
# 결정 트리
library(rpart)
head(iris)
dtc <- rpart(Species~., iris) # iris 데이터를 결정 트리로 학습
summary(dtc)
dtc
# 결정 트리 시각화
par(mfrow=c(1,1), xpd=NA)
plot(dtc)
text(dtc, use.n=T)
# 예측
pred <- predict(dtc, iris, type='class')
table(pred, iris$Species)
# 평가
library(caret)
confusionMatrix(pred, iris$Species)
# 시각화
librar... | /ch09/ch09-1.R | no_license | bill2692/R-Lecture-2021 | R | false | false | 936 | r | # 분류
# 결정 트리
library(rpart)
head(iris)
dtc <- rpart(Species~., iris) # iris 데이터를 결정 트리로 학습
summary(dtc)
dtc
# 결정 트리 시각화
par(mfrow=c(1,1), xpd=NA)
plot(dtc)
text(dtc, use.n=T)
# 예측
pred <- predict(dtc, iris, type='class')
table(pred, iris$Species)
# 평가
library(caret)
confusionMatrix(pred, iris$Species)
# 시각화
librar... |
## The below two functions are built to create a special object
## that stores a matrix and caches its inverse matrix.
## The function makeCacheMatrix creates a list containing a function
## to set and get the values of a matrix and set and get the values
## of the inverse matrix.
makeCacheMatrix <- function(x = ... | /cachematrix.R | no_license | MelSic/ProgrammingAssignment2 | R | false | false | 1,260 | r | ## The below two functions are built to create a special object
## that stores a matrix and caches its inverse matrix.
## The function makeCacheMatrix creates a list containing a function
## to set and get the values of a matrix and set and get the values
## of the inverse matrix.
makeCacheMatrix <- function(x = ... |
#####################################
# plot 3
#####################################
# read data
d <- read.table("~/Downloads/household_power_consumption.txt",header=TRUE,sep = ";")
d2 <- subset(d,as.Date(Date,format="%d/%m/%Y") >= as.Date("1/2/2007",format="%d/%m/%Y") & as.Date(Date,format="%d/%m/%Y") <= as.Date("2/2/... | /plot3.R | no_license | aaronlou/ExData_Plotting1 | R | false | false | 1,102 | r | #####################################
# plot 3
#####################################
# read data
d <- read.table("~/Downloads/household_power_consumption.txt",header=TRUE,sep = ";")
d2 <- subset(d,as.Date(Date,format="%d/%m/%Y") >= as.Date("1/2/2007",format="%d/%m/%Y") & as.Date(Date,format="%d/%m/%Y") <= as.Date("2/2/... |
"userfd" <-
function(s) {
if (missing(s)) return (14)
f.res <- double(s)
f.res
}
| /R/userfd.R | no_license | cran/robeth | R | false | false | 89 | r | "userfd" <-
function(s) {
if (missing(s)) return (14)
f.res <- double(s)
f.res
}
|
library(AnalyzeFMRI)
### Name: f.basic.hdr.nifti.list.create
### Title: creates basic .hdr list in NIFTI format
### Aliases: f.basic.hdr.nifti.list.create
### Keywords: utilities
### ** Examples
dim.mat <- c(20,30,40,3)
file<-"temp.hdr"
f.basic.hdr.nifti.list.create(dim.mat, file)
| /data/genthat_extracted_code/AnalyzeFMRI/examples/f.basic.hdr.nifti.list.create.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 289 | r | library(AnalyzeFMRI)
### Name: f.basic.hdr.nifti.list.create
### Title: creates basic .hdr list in NIFTI format
### Aliases: f.basic.hdr.nifti.list.create
### Keywords: utilities
### ** Examples
dim.mat <- c(20,30,40,3)
file<-"temp.hdr"
f.basic.hdr.nifti.list.create(dim.mat, file)
|
#filename: DA-A01-1PI11CS050-ChitraSingh.R
interpolateConstGr <- function(mydata) #interpolation for a constant growth rate
{
newdata <- subset(mydata, FALSE) #new data-frame to store data temporarily
i <- 1
n <- nrow(mydata)
while(i < n)
{
diff <- mydata$year[i+1] - mydata$year[i] #difference to check if ... | /01/Answer/DA-A01-1PI11CS050-ChitraSingh.R | permissive | chitraa/Data-Analysis-Coursework | R | false | false | 2,299 | r | #filename: DA-A01-1PI11CS050-ChitraSingh.R
interpolateConstGr <- function(mydata) #interpolation for a constant growth rate
{
newdata <- subset(mydata, FALSE) #new data-frame to store data temporarily
i <- 1
n <- nrow(mydata)
while(i < n)
{
diff <- mydata$year[i+1] - mydata$year[i] #difference to check if ... |
sNCA = function(x, y, dose=0, adm="Extravascular", dur=0, doseUnit="mg", timeUnit="h", concUnit="ug/L", iAUC="", down="Linear", MW=0, returnNA=TRUE)
{
# Author: Kyun-Seop Bae k@acr.kr
# Last modification: 2017.7.26
# Called by: tabNCA
# Calls: BestSlope, IntAUC, Unit, UT
# INPUT
# x: time or similar vector
# ... | /R/sNCA.R | no_license | asancpt/pkr | R | false | false | 6,990 | r | sNCA = function(x, y, dose=0, adm="Extravascular", dur=0, doseUnit="mg", timeUnit="h", concUnit="ug/L", iAUC="", down="Linear", MW=0, returnNA=TRUE)
{
# Author: Kyun-Seop Bae k@acr.kr
# Last modification: 2017.7.26
# Called by: tabNCA
# Calls: BestSlope, IntAUC, Unit, UT
# INPUT
# x: time or similar vector
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-shakespeare.R
\docType{data}
\name{shakespeare_32}
\alias{shakespeare_32}
\title{Timon of Athens}
\format{igraph object}
\source{
Raw data downloaded from https://github.com/mallaham/Shakespeare-Plays
}
\usage{
shakespeare_32
}
\descript... | /man/shakespeare_32.Rd | permissive | kjhealy/networkdata | R | false | true | 401 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-shakespeare.R
\docType{data}
\name{shakespeare_32}
\alias{shakespeare_32}
\title{Timon of Athens}
\format{igraph object}
\source{
Raw data downloaded from https://github.com/mallaham/Shakespeare-Plays
}
\usage{
shakespeare_32
}
\descript... |
#4. Ordenagailu Praktika EMI Mikel Laorden:
# 1.Ariketa:
# X ~ P(landa)
# X : "Urtero aholkularitza enplesak aholkuak jasotzen dituzten pertsona kopurua"
# a) P(x>1085) = 1 - P(x<=1085)
1-ppois(1085,1200)
ppois(1085,1200,lower.tail = F)
# b) P(1200 <= x <= 1300)
ppois(1300,1200... | /src/praktika4/EMIprakt4Arik.R | no_license | Jasielprogramador/examen_R | R | false | false | 2,191 | r | #4. Ordenagailu Praktika EMI Mikel Laorden:
# 1.Ariketa:
# X ~ P(landa)
# X : "Urtero aholkularitza enplesak aholkuak jasotzen dituzten pertsona kopurua"
# a) P(x>1085) = 1 - P(x<=1085)
1-ppois(1085,1200)
ppois(1085,1200,lower.tail = F)
# b) P(1200 <= x <= 1300)
ppois(1300,1200... |
\name{hideSheet-methods}
\docType{methods}
\alias{hideSheet}
\alias{hideSheet-methods}
\alias{hideSheet,workbook,character-method}
\alias{hideSheet,workbook,numeric-method}
\title{Hiding worksheets in a workbook}
\description{
(Very) hides the specified worksheets in a \code{\linkS4class{workbook}}.
}
\usage... | /man/hideSheet-methods.Rd | no_license | HouYonghui/xlconnect | R | false | false | 2,558 | rd | \name{hideSheet-methods}
\docType{methods}
\alias{hideSheet}
\alias{hideSheet-methods}
\alias{hideSheet,workbook,character-method}
\alias{hideSheet,workbook,numeric-method}
\title{Hiding worksheets in a workbook}
\description{
(Very) hides the specified worksheets in a \code{\linkS4class{workbook}}.
}
\usage... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prob_func.R
\name{integral}
\alias{integral}
\title{Integrand SMNG density function}
\usage{
integral(t, a, b, c, l)
}
\description{
Function that implements the integral part that appears in the SMNG density function.
}
\keyword{internal}
| /BayesLN/man/integral.Rd | no_license | akhikolla/ClusterTests | R | false | true | 319 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prob_func.R
\name{integral}
\alias{integral}
\title{Integrand SMNG density function}
\usage{
integral(t, a, b, c, l)
}
\description{
Function that implements the integral part that appears in the SMNG density function.
}
\keyword{internal}
|
#' Check convergence of multiple MCMC chains
#'
#' Uses Gelman multivariate Gelman-Rubin diagnostic to check if
#' multiple MCMC chains have converged
#' @param jags_out mcmc.list object (from coda package) containing
#' samples from MCMC chains.
#' @param threshold Gelman-Rubin diagnostic parameter threshold. Defau... | /modules/rtm/R/check.convergence.R | permissive | femeunier/pecan | R | false | false | 1,970 | r | #' Check convergence of multiple MCMC chains
#'
#' Uses Gelman multivariate Gelman-Rubin diagnostic to check if
#' multiple MCMC chains have converged
#' @param jags_out mcmc.list object (from coda package) containing
#' samples from MCMC chains.
#' @param threshold Gelman-Rubin diagnostic parameter threshold. Defau... |
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
... | /9 - Data products/Week 4 project/webapp/ui.R | no_license | messup/Coursera-R-Data-Science-Specialisation | R | false | false | 1,338 | r | #
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
... |
##########determine uni. I(.)#################################################
adf=matrix(data=NA,nrow=8,ncol=8)
for (i in 1:8) {
adf1 <- summary(ur.df(a[,i], type = "trend", lags =trunc((length(a[,i])-1)^(1/3))))
adf2 <- summary(ur.df(diff(a[, i]), type = "trend", lags = trunc((length(a[,i])-1)^(1/3))-1-1))
adf[i,1]=a... | /US-Dairy-Products/R Code/Stationarity Test.R | no_license | jzt5132/Time-Series-Stuff | R | false | false | 416 | r | ##########determine uni. I(.)#################################################
adf=matrix(data=NA,nrow=8,ncol=8)
for (i in 1:8) {
adf1 <- summary(ur.df(a[,i], type = "trend", lags =trunc((length(a[,i])-1)^(1/3))))
adf2 <- summary(ur.df(diff(a[, i]), type = "trend", lags = trunc((length(a[,i])-1)^(1/3))-1-1))
adf[i,1]=a... |
# Setup Environment -------------------------------------------------------
# Set the Timezone Offset from UTC
tzOffset <- "Etc/GMT+3" # Falklands time in the winter
# Set the Working Directory to the location of this File
current_path = rstudioapi::getActiveDocumentContext()$path
setwd(dirname(current_path ))
rm(cu... | /TWLogger Processing Down Sample to 10Hz.R | no_license | katiejh08/TWlogger | R | false | false | 5,941 | r | # Setup Environment -------------------------------------------------------
# Set the Timezone Offset from UTC
tzOffset <- "Etc/GMT+3" # Falklands time in the winter
# Set the Working Directory to the location of this File
current_path = rstudioapi::getActiveDocumentContext()$path
setwd(dirname(current_path ))
rm(cu... |
#' Dataset A of the NN3 Competition
#'
#' The NN3 Competition dataset composed of monthly time series drawn from
#' homogeneous population of real empirical business time series.
#'
#' The NN3 Competition's Dataset A contains 111 different monthly time series.
#' Each of this time series possess from 50 to 12... | /R/NN3.A.r | no_license | cran/TSPred | R | false | false | 12,420 | r | #' Dataset A of the NN3 Competition
#'
#' The NN3 Competition dataset composed of monthly time series drawn from
#' homogeneous population of real empirical business time series.
#'
#' The NN3 Competition's Dataset A contains 111 different monthly time series.
#' Each of this time series possess from 50 to 12... |
#' Estimates total individual tree height in function of its DBH and stand-level parameters
#'
#' Estimates individual tree height form a model of stand-level parameters:
#' dominant height (HD, m), quadratic diameter (QD, cm), and diameter at breast height (DBH, cm).
#'
#' @param DOM.SP Dominant species (1: Rauli, 2: ... | /R/height_param.R | no_license | wcalcagno/Nothopack | R | false | false | 1,850 | r | #' Estimates total individual tree height in function of its DBH and stand-level parameters
#'
#' Estimates individual tree height form a model of stand-level parameters:
#' dominant height (HD, m), quadratic diameter (QD, cm), and diameter at breast height (DBH, cm).
#'
#' @param DOM.SP Dominant species (1: Rauli, 2: ... |
library(jskm)
### Name: svyjskm
### Title: Creates a Weighted Kaplan-Meier plot - svykm.object in survey
### package
### Aliases: svyjskm
### ** Examples
library(survey)
data(pbc, package="survival")
pbc$randomized <- with(pbc, !is.na(trt) & trt>0)
biasmodel <- glm(randomized~age*edema,data=pbc)
pbc$randprob... | /data/genthat_extracted_code/jskm/examples/svyjskm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 495 | r | library(jskm)
### Name: svyjskm
### Title: Creates a Weighted Kaplan-Meier plot - svykm.object in survey
### package
### Aliases: svyjskm
### ** Examples
library(survey)
data(pbc, package="survival")
pbc$randomized <- with(pbc, !is.na(trt) & trt>0)
biasmodel <- glm(randomized~age*edema,data=pbc)
pbc$randprob... |
#include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"Floyed"
},
/* [3] */
Category {
"Animation Gym"
},
#ifdef AE_OS_WIN
#ifdef AE_... | /Esso_HalftonePiPL.r | no_license | eslamami/floyed-AE_SDK | R | false | false | 926 | r | #include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"Floyed"
},
/* [3] */
Category {
"Animation Gym"
},
#ifdef AE_OS_WIN
#ifdef AE_... |
library(verification)
### Name: fss
### Title: Fractional Skill Score
### Aliases: fss
### Keywords: file
### ** Examples
grid<- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj<-Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look<- sim.rf( obj)
look[look < 0] <- 0
look2 <- sim.rf( obj)
look2[look2<0] <- 0
fss(lo... | /data/genthat_extracted_code/verification/examples/fss.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,436 | r | library(verification)
### Name: fss
### Title: Fractional Skill Score
### Aliases: fss
### Keywords: file
### ** Examples
grid<- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj<-Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look<- sim.rf( obj)
look[look < 0] <- 0
look2 <- sim.rf( obj)
look2[look2<0] <- 0
fss(lo... |
## load libraries
library(nimble)
library(tidyverse)
library(mvtnorm)
library(boot)
library(lamW)
library(GGally)
library(coda)
library(mclust)
library(parallel)
library(survminer)
library(survival)
rm(list = ls())
## source necessary R distributions
source("../../Distributions/Dist_Gompertz.R")
source("../../Distribu... | /MongooseDataAnalysis/SexSpecific/ModelFitting/FitSilerSexDiffB2Mongoose.R | no_license | davehudson67/BayesianModelComparisonsRCode | R | false | false | 11,654 | r | ## load libraries
library(nimble)
library(tidyverse)
library(mvtnorm)
library(boot)
library(lamW)
library(GGally)
library(coda)
library(mclust)
library(parallel)
library(survminer)
library(survival)
rm(list = ls())
## source necessary R distributions
source("../../Distributions/Dist_Gompertz.R")
source("../../Distribu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_urls.R
\name{extract_urls_from_webpage}
\alias{extract_urls_from_webpage}
\title{Extracts the urls from a webpage.}
\usage{
extract_urls_from_webpage(url, except = NULL)
}
\arguments{
\item{url}{The url to extract urls.}
\item{except... | /man/extract_urls_from_webpage.Rd | permissive | QualitativeDataRepository/archivr | R | false | true | 800 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_urls.R
\name{extract_urls_from_webpage}
\alias{extract_urls_from_webpage}
\title{Extracts the urls from a webpage.}
\usage{
extract_urls_from_webpage(url, except = NULL)
}
\arguments{
\item{url}{The url to extract urls.}
\item{except... |
#!/usr/bin/Rscript
library(ggplot2)
library(tsne)
## setwd and load files
print("Loading files...")
args=commandArgs(trailingOnly=TRUE)
if (length(args)!=1) {
stop("This script requires one argument (the pca input file)")
} else {
input_pca = read.table(args[1],header=TRUE)
input_pca_name = basename(args[1])
}
... | /Scripts/tsneBatch.R | no_license | flw88/deepseq_awesome | R | false | false | 3,674 | r | #!/usr/bin/Rscript
library(ggplot2)
library(tsne)
## setwd and load files
print("Loading files...")
args=commandArgs(trailingOnly=TRUE)
if (length(args)!=1) {
stop("This script requires one argument (the pca input file)")
} else {
input_pca = read.table(args[1],header=TRUE)
input_pca_name = basename(args[1])
}
... |
library(leaflet)
# Choices for drop-downs
vars <- c("Emissie hoeveelheid" = "hoeveelheid", "Jaarlijkse omzet van het bedrijf" = "income")
stof_jaar <- unique(alle_emissies[,2:3])
stoffen <- sort(unique(unlist(stof_jaar$stof)))
jaren <- sort(unique(unlist(stof_jaar$jaar)))
navbarPage("Emissie naar lucht", id="nav",
... | /emissies_lucht/ui.R | no_license | gezever/emissies | R | false | false | 4,362 | r | library(leaflet)
# Choices for drop-downs
vars <- c("Emissie hoeveelheid" = "hoeveelheid", "Jaarlijkse omzet van het bedrijf" = "income")
stof_jaar <- unique(alle_emissies[,2:3])
stoffen <- sort(unique(unlist(stof_jaar$stof)))
jaren <- sort(unique(unlist(stof_jaar$jaar)))
navbarPage("Emissie naar lucht", id="nav",
... |
library(reshape2)
library(Seurat)
library(viridis)
library(ggrepel)
library(scales)
library(ggsignif)
library(ggpubr)
library(patchwork)
setwd("/Volumes/BZ/Home/gizevo30/R_Projects/Cavefish_Paper/Seurat_v3_Integration/SCENIC")
hypo.zeb <- readRDS("/Volumes/BZ/Home/gizevo30/R_Projects/Cavefish_Paper/DanRer_Hypo/DanRer_... | /Seurat_v3_Integration/SCENIC/SCENIC_figures_script.R | no_license | wangchengww/Cavefish_Paper | R | false | false | 14,373 | r | library(reshape2)
library(Seurat)
library(viridis)
library(ggrepel)
library(scales)
library(ggsignif)
library(ggpubr)
library(patchwork)
setwd("/Volumes/BZ/Home/gizevo30/R_Projects/Cavefish_Paper/Seurat_v3_Integration/SCENIC")
hypo.zeb <- readRDS("/Volumes/BZ/Home/gizevo30/R_Projects/Cavefish_Paper/DanRer_Hypo/DanRer_... |
###################################### POSTWORK ####################################
#Importa los datos de soccer de las temporadas 2017/2018, 2018/2019 y 2019/2020
#de la primera división de la liga española
path.f <- setwd("c:/Users/gely_/Documents/ArchivosF")
t17.18 <- select(read.csv("D1.csv"), Date, HomeTeam, Awa... | /Sesión-2.R | no_license | Lup05/Postworks | R | false | false | 1,831 | r | ###################################### POSTWORK ####################################
#Importa los datos de soccer de las temporadas 2017/2018, 2018/2019 y 2019/2020
#de la primera división de la liga española
path.f <- setwd("c:/Users/gely_/Documents/ArchivosF")
t17.18 <- select(read.csv("D1.csv"), Date, HomeTeam, Awa... |
\name{CONGA.fn}
\alias{CONGA.fn}
\title{
Function to calculate the continuous overlapping net glycemic action (CONGA)
}
\description{
For each observation after the first n hours of observations, the difference between the current observation and the observation n hours previous was calculated. CONGA is defin... | /man/CONGA.fn.Rd | no_license | cran/CGManalyzer | R | false | false | 1,138 | rd | \name{CONGA.fn}
\alias{CONGA.fn}
\title{
Function to calculate the continuous overlapping net glycemic action (CONGA)
}
\description{
For each observation after the first n hours of observations, the difference between the current observation and the observation n hours previous was calculated. CONGA is defin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateCommentTable.r
\name{updateCommentTable}
\alias{updateCommentTable}
\title{Identify New WQP comment combinations and append them into IR Parameter Translation Workbook for review (sheet name activityCommentTable)}
\usage{
updateCommentT... | /man/updateCommentTable.Rd | permissive | utah-dwq/irTools | R | false | true | 1,559 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateCommentTable.r
\name{updateCommentTable}
\alias{updateCommentTable}
\title{Identify New WQP comment combinations and append them into IR Parameter Translation Workbook for review (sheet name activityCommentTable)}
\usage{
updateCommentT... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_individuals.r
\name{make_geno}
\alias{make_geno}
\title{Create genotype matrix}
\usage{
make_geno(nid, nsnp, af)
}
\arguments{
\item{nid}{Number of samples}
\item{nsnp}{Number of SNPs}
\item{af}{Allele frequency of all SNPs (all SN... | /man/make_geno.Rd | permissive | explodecomputer/simulateGP | R | false | true | 463 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_individuals.r
\name{make_geno}
\alias{make_geno}
\title{Create genotype matrix}
\usage{
make_geno(nid, nsnp, af)
}
\arguments{
\item{nid}{Number of samples}
\item{nsnp}{Number of SNPs}
\item{af}{Allele frequency of all SNPs (all SN... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticbeanstalk_operations.R
\name{elasticbeanstalk_update_application_resource_lifecycle}
\alias{elasticbeanstalk_update_application_resource_lifecycle}
\title{Modifies lifecycle settings for an application}
\usage{
elasticbeanstalk_update_... | /paws/man/elasticbeanstalk_update_application_resource_lifecycle.Rd | permissive | johnnytommy/paws | R | false | true | 1,119 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticbeanstalk_operations.R
\name{elasticbeanstalk_update_application_resource_lifecycle}
\alias{elasticbeanstalk_update_application_resource_lifecycle}
\title{Modifies lifecycle settings for an application}
\usage{
elasticbeanstalk_update_... |
##################################################
###----------- TRABALHO EM GRUPO ------------###
###-------------Analise Preditiva------------ ####
##################################################
########## ENSEMBLE METHODS - ADABOOST ###########
#install.packages("adabag")
library(adabag)
library(caret)
# ... | /Modelo_Satisfacao/Adaboost.R | permissive | pykishi/Trabalhos_MBA | R | false | false | 5,652 | r | ##################################################
###----------- TRABALHO EM GRUPO ------------###
###-------------Analise Preditiva------------ ####
##################################################
########## ENSEMBLE METHODS - ADABOOST ###########
#install.packages("adabag")
library(adabag)
library(caret)
# ... |
# pull age-by-sex (by state)
library(ggplot2)
source("censusapi/functions.R")
# you'll need to specify a key - https://api.census.gov/data/key_signup.html
# SA analyst note: you can ask Dan to send you his key
Sys.setenv(CENSUS_KEY = Sys.getenv("CENSUS_API_KEY"))
# get sex-by-age for each state
pop_seg <- sapply(20... | /censusapi/run.R | no_license | southwick-associates/census-template | R | false | false | 672 | r | # pull age-by-sex (by state)
library(ggplot2)
source("censusapi/functions.R")
# you'll need to specify a key - https://api.census.gov/data/key_signup.html
# SA analyst note: you can ask Dan to send you his key
Sys.setenv(CENSUS_KEY = Sys.getenv("CENSUS_API_KEY"))
# get sex-by-age for each state
pop_seg <- sapply(20... |
library(moments)
errMeasureRMSE <- function(v1,v2)
{
sqrt(mean((v1 - v2)^2))
}
errMeasure <- function (vPred, vTarget)
{
if (length(vPred) != length(vTarget))
return(-1);
s1 = log(1+vPred)
s2 = log(1+vTarget)
s12 = (s1-s2)^2
return(list(sqrt(mean(s12,na.rm = TRUE)),(s1-s2),s12))
}
errMeasure3 <- func... | /R/futil.R | no_license | tudor-m/Kaggle-Bosch | R | false | false | 4,107 | r | library(moments)
errMeasureRMSE <- function(v1,v2)
{
sqrt(mean((v1 - v2)^2))
}
errMeasure <- function (vPred, vTarget)
{
if (length(vPred) != length(vTarget))
return(-1);
s1 = log(1+vPred)
s2 = log(1+vTarget)
s12 = (s1-s2)^2
return(list(sqrt(mean(s12,na.rm = TRUE)),(s1-s2),s12))
}
errMeasure3 <- func... |
#' An API to Download Short Selling Turnover on Main Board
#'
#' The function is to retrieve short selling turnover on main board
#' @param no parameter
#' @keywords hkex.api
#' @export
#' @references https://www.hkex.com.hk
#' @examples data <- getLastShortSelling()
#' getLastShortSelling()
getLastShortSelling=functio... | /R/getLastShortSelling.R | no_license | cskmlui/hkex.api | R | false | false | 1,395 | r | #' An API to Download Short Selling Turnover on Main Board
#'
#' The function is to retrieve short selling turnover on main board
#' @param no parameter
#' @keywords hkex.api
#' @export
#' @references https://www.hkex.com.hk
#' @examples data <- getLastShortSelling()
#' getLastShortSelling()
getLastShortSelling=functio... |
ans <- get_answer(P,C,M,L)
df_pos <- cbind(1:length(P),M,ans$duals[-(1:length(L))],ans$duals.from[-(1:length(L))],ans$duals.to[-(1:length(L))])
df_pos <- data.frame(df_pos)
colnames(df_pos) <- c("Bonds","Maturity","Duals","From", "To")
plot(df_pos$Maturity, df_pos$Duals, main = "Duals by Maturity Periods (Non-Negativi... | /Project1/duality.R | no_license | korawat-tanwisuth/Stochastic-Optimization | R | false | false | 830 | r | ans <- get_answer(P,C,M,L)
df_pos <- cbind(1:length(P),M,ans$duals[-(1:length(L))],ans$duals.from[-(1:length(L))],ans$duals.to[-(1:length(L))])
df_pos <- data.frame(df_pos)
colnames(df_pos) <- c("Bonds","Maturity","Duals","From", "To")
plot(df_pos$Maturity, df_pos$Duals, main = "Duals by Maturity Periods (Non-Negativi... |
library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/thyroid.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.02,family="gaussian",standardize=TRUE)
sink('./Model/EN/Lasso/thyroid/thyroid_011.txt',append=T... | /Model/EN/Lasso/thyroid/thyroid_011.R | no_license | leon1003/QSMART | R | false | false | 354 | r | library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/thyroid.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.02,family="gaussian",standardize=TRUE)
sink('./Model/EN/Lasso/thyroid/thyroid_011.txt',append=T... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{box}
\alias{box}
\title{Box-Cox Transformation}
\usage{
box(data, lambda)
}
\arguments{
\item{data}{A numeric vector, matrix or data frame of observations.
Negative data values are permitted.}
\item{lambda}{The transformation to... | /man/box.Rd | no_license | RGLab/flowClust | R | false | true | 1,682 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{box}
\alias{box}
\title{Box-Cox Transformation}
\usage{
box(data, lambda)
}
\arguments{
\item{data}{A numeric vector, matrix or data frame of observations.
Negative data values are permitted.}
\item{lambda}{The transformation to... |
library(sf)
tract<-read_sf("tract_data_new.shp")
head(tract)
colnames(tract)
tract$num_doc
tract$ScoreHSGED <- ((tract$num_hs + tract$num_ged) * 25)
tract$ScoreAsPro <- ((tract$num_as + tract$num_pro) * 50)
tract$ScoreBach <- (tract$num_bac*75)
tract$ScoreGrad <- ((tract$num_mas + tract$num_doc) * 100)
tract$TractEdu... | /script_CalcEduLevelScore.R | no_license | dtaillie4/datamagicIANs | R | false | false | 467 | r | library(sf)
tract<-read_sf("tract_data_new.shp")
head(tract)
colnames(tract)
tract$num_doc
tract$ScoreHSGED <- ((tract$num_hs + tract$num_ged) * 25)
tract$ScoreAsPro <- ((tract$num_as + tract$num_pro) * 50)
tract$ScoreBach <- (tract$num_bac*75)
tract$ScoreGrad <- ((tract$num_mas + tract$num_doc) * 100)
tract$TractEdu... |
####################################################################################
#Name: CBW-LULC Analysis Demo
#Coder: C. Nathan Jones
#Date: 6/6/2018
#Purpose: Demo watershed delineation and LULC change analysis for USGS gages accross
# the Chesepeake Bay Watershed
# # Helpful link -- http://ibis.g... | /CBP_Watershed_Analysis/CBW-LULC_Analysis_Demo.R | permissive | FloodHydrology/InundationHydRology | R | false | false | 8,056 | r | ####################################################################################
#Name: CBW-LULC Analysis Demo
#Coder: C. Nathan Jones
#Date: 6/6/2018
#Purpose: Demo watershed delineation and LULC change analysis for USGS gages accross
# the Chesepeake Bay Watershed
# # Helpful link -- http://ibis.g... |
library(tidyverse)
protectgrp <- read.csv("DataFig1_202104.csv", stringsAsFactors=FALSE)
protectgrp <- protectgrp[which(protectgrp$GAP12_Protected!=""),]
names(protectgrp) <- c("group", "percentprotected")
protectgrp[which(protectgrp$group=="Vascular Plants"),"group"] <- "Plants"
protectgrp[which(protectgrp$group=="... | /fig1.r | no_license | ChristopherTracey/MoBI_figures | R | false | false | 1,742 | r | library(tidyverse)
protectgrp <- read.csv("DataFig1_202104.csv", stringsAsFactors=FALSE)
protectgrp <- protectgrp[which(protectgrp$GAP12_Protected!=""),]
names(protectgrp) <- c("group", "percentprotected")
protectgrp[which(protectgrp$group=="Vascular Plants"),"group"] <- "Plants"
protectgrp[which(protectgrp$group=="... |
#' ETL process that download current CAPEC definitions and return a list with a
#' data frame for CAPEC objects. The list also contains a visNetwork object with
#' CAPEC objects as nodes and all relations as edges.
#'
#' @param verbose Default set as FALSE
#'
#' @return list of data frames
getCAPECData <- function(verb... | /R/capec.R | permissive | Barbero95/mitre | R | false | false | 14,808 | r | #' ETL process that download current CAPEC definitions and return a list with a
#' data frame for CAPEC objects. The list also contains a visNetwork object with
#' CAPEC objects as nodes and all relations as edges.
#'
#' @param verbose Default set as FALSE
#'
#' @return list of data frames
getCAPECData <- function(verb... |
## ------------- bayesGAM Classes ----------------------------------------
setClass("distribution",
slots=c(name = "character",
distnum = "integer",
num_params = "integer",
param_names = "character",
param_values = "numeric"))
valid_distrib... | /fuzzedpackages/bayesGAM/R/AllClasses.R | no_license | akhikolla/testpackages | R | false | false | 7,216 | r |
## ------------- bayesGAM Classes ----------------------------------------
setClass("distribution",
slots=c(name = "character",
distnum = "integer",
num_params = "integer",
param_names = "character",
param_values = "numeric"))
valid_distrib... |
######################
## Course Project 1 ##
######################
## 1. Set global settings
# UK locale
Sys.setlocale("LC_TIME", "en_GB")
# Working directory and dataset file name
DIR <- "/Users/adn/Documents/Perso/MOOCs/Coursera/Data Specialisation/4. Exploratory Data Analysis/CourseProject1/ExData_Plotting1"
set... | /plot1.R | no_license | trojette/ExData_Plotting1 | R | false | false | 1,659 | r | ######################
## Course Project 1 ##
######################
## 1. Set global settings
# UK locale
Sys.setlocale("LC_TIME", "en_GB")
# Working directory and dataset file name
DIR <- "/Users/adn/Documents/Perso/MOOCs/Coursera/Data Specialisation/4. Exploratory Data Analysis/CourseProject1/ExData_Plotting1"
set... |
# *********************************
# CRUZADAS PARA ENSAMBLADO DEPENDIENTE BINARIA
# *********************************
# VALIDACIÓN CRUZADA REPETIDA Y BOXPLOT para
#
# LOGISTICA
# AVNNET
# RF
# GBM
# XGBM
# SVM
# ES NECESARIO QUE LA VARIABLE DEPENDIENTE ESTÉ CATEGORIZADA
# COMO Yes,No
# ****************************... | /librerias/cruzadas ensamblado binaria fuente.R | no_license | AlbertoUAH/MachineLearning | R | false | false | 23,046 | r | # *********************************
# CRUZADAS PARA ENSAMBLADO DEPENDIENTE BINARIA
# *********************************
# VALIDACIÓN CRUZADA REPETIDA Y BOXPLOT para
#
# LOGISTICA
# AVNNET
# RF
# GBM
# XGBM
# SVM
# ES NECESARIO QUE LA VARIABLE DEPENDIENTE ESTÉ CATEGORIZADA
# COMO Yes,No
# ****************************... |
\name{normDiffCI}
\alias{normDiffCI}
\title{ Confidence Intervals for Difference of Means }
\description{
This function can be used to compute confidence intervals for difference
of means assuming normal distributions.
}
\usage{
normDiffCI(x, y, conf.level = 0.95, paired = FALSE, method = "welch", na.rm = TRUE)
}
\... | /man/normDiffCI.Rd | no_license | stamats/MKmisc | R | false | false | 2,960 | rd | \name{normDiffCI}
\alias{normDiffCI}
\title{ Confidence Intervals for Difference of Means }
\description{
This function can be used to compute confidence intervals for difference
of means assuming normal distributions.
}
\usage{
normDiffCI(x, y, conf.level = 0.95, paired = FALSE, method = "welch", na.rm = TRUE)
}
\... |
out_file = "model_comparison_results.txt"
log = read.table("output/ase_freeK_RJ.log", header=TRUE, sep="\t", stringsAsFactors=FALSE)
total_samples = length(log$rate_01)
m1_rate_samples = length(which(log$rate_01 == log$rate_10))
m01_irreversible = length(which(log$rate_01 == 0))
m10_irreversible = length(which(log$ra... | /compute_model_posteriors.R | no_license | ryanacook2/hyperossification | R | false | false | 2,874 | r | out_file = "model_comparison_results.txt"
log = read.table("output/ase_freeK_RJ.log", header=TRUE, sep="\t", stringsAsFactors=FALSE)
total_samples = length(log$rate_01)
m1_rate_samples = length(which(log$rate_01 == log$rate_10))
m01_irreversible = length(which(log$rate_01 == 0))
m10_irreversible = length(which(log$ra... |
# Apriori
# Data Preprocessing
install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
itemFrequencyPlot(dataset, topN = 10)
# Training Apriori on the dataset
rules = a... | /Part 5 - Association Rule Learning/1. Apriori/Apri.R | no_license | ilyagz/Machine-Learning | R | false | false | 462 | r | # Apriori
# Data Preprocessing
install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
itemFrequencyPlot(dataset, topN = 10)
# Training Apriori on the dataset
rules = a... |
rm(list=ls())
# load scripts ------------------------------------------------------------
library(parallel)
scriptDir <- "."
outputDir <- "../outputs"
refDir <- "../refData"
scripts <- c("helper.R", "simTranscriptome.R", "simRibosomeDist.R", "simFootprints.R")
for(x in scripts) {source(file.path(scriptDir, x))}
# ... | /simulation_runs/yeast_mainScript.R | no_license | ewallace/simRiboSeq | R | false | false | 9,819 | r | rm(list=ls())
# load scripts ------------------------------------------------------------
library(parallel)
scriptDir <- "."
outputDir <- "../outputs"
refDir <- "../refData"
scripts <- c("helper.R", "simTranscriptome.R", "simRibosomeDist.R", "simFootprints.R")
for(x in scripts) {source(file.path(scriptDir, x))}
# ... |
rm(list = ls())
# setwd("C:\\Users\\Tom Orlando\\Monash\\FIT3164")
# install.packages("readxl")
# install.packages("dplyr")
library(readxl)
library("dplyr")
# load dataset and explore data
heart <- read_excel('./data/full_data/heart_initial.xlsx')
dim(heart)
summary(heart)
str(heart)
# Missing value processing -... | /data/pre_processing/data_cleaning.r | no_license | abrarhamzah/Hearty | R | false | false | 2,887 | r |
rm(list = ls())
# setwd("C:\\Users\\Tom Orlando\\Monash\\FIT3164")
# install.packages("readxl")
# install.packages("dplyr")
library(readxl)
library("dplyr")
# load dataset and explore data
heart <- read_excel('./data/full_data/heart_initial.xlsx')
dim(heart)
summary(heart)
str(heart)
# Missing value processing -... |
test.HGcoxreg <-
function(testing = TRUE,
test.name = "HGcoxreg"
)
{
set.seed(1)
n <- 50
x <- matrix(rnorm(n * 200), nrow = n) # Generate data
lp <- 3 + x[, 1]
a <- 1 # Weibull shape parameter 1 - exponential distribution
... | /R/test.HGcoxreg.r | no_license | parsifal9/ptools | R | false | false | 670 | r | test.HGcoxreg <-
function(testing = TRUE,
test.name = "HGcoxreg"
)
{
set.seed(1)
n <- 50
x <- matrix(rnorm(n * 200), nrow = n) # Generate data
lp <- 3 + x[, 1]
a <- 1 # Weibull shape parameter 1 - exponential distribution
... |
#' Break path into groups, according to mean and variance
#'
#' @param data Dataset
#' @param path Path
#' @param lat Path latitudes
#' @param lon Path longitudes
#'
#' @return data.frame with 2 columns: group and mean value of group
#' @export
#'
getGroups <- function(data, path, lat, lon) {
nr <- length(lat)
path... | /R/getGroups.R | no_license | rtlemos/scurvy | R | false | false | 992 | r | #' Break path into groups, according to mean and variance
#'
#' @param data Dataset
#' @param path Path
#' @param lat Path latitudes
#' @param lon Path longitudes
#'
#' @return data.frame with 2 columns: group and mean value of group
#' @export
#'
getGroups <- function(data, path, lat, lon) {
nr <- length(lat)
path... |
# Shiny
library(shiny)
library(magrittr)
shiny::runGitHub('abjur/vistemplate',
subdir='exemplo_01_helloworld',
display.mode='showcase')
# reactive - run once
# isolate - let choose filter so it can run later
diamonds %>%
lm(carat ~ price, data = .) %>%
coef() -> coef_lm
g... | /curso-r-2016/Aulas/aula08.R | no_license | ralfcosta/analytics | R | false | false | 442 | r | # Shiny
library(shiny)
library(magrittr)
shiny::runGitHub('abjur/vistemplate',
subdir='exemplo_01_helloworld',
display.mode='showcase')
# reactive - run once
# isolate - let choose filter so it can run later
diamonds %>%
lm(carat ~ price, data = .) %>%
coef() -> coef_lm
g... |
library(tidyverse)
library(magrittr)
library(dplyr)
library(visdat)
a <- WDI::WDI(country = 'all', indicator = c("NY.ADJ.NNTY.PC.KD", "SP.DYN.LE00.IN"),
start = 2000, end = 2020, extra = TRUE)
a <- a[a$region != 'Aggregates', ]
library(countrycode)
a$country <- countrycode::countryname(sourcevar = ... | /Tarea 3 script.R | no_license | JNicolasCC/Tarea3_Cabrera | R | false | false | 2,526 | r | library(tidyverse)
library(magrittr)
library(dplyr)
library(visdat)
a <- WDI::WDI(country = 'all', indicator = c("NY.ADJ.NNTY.PC.KD", "SP.DYN.LE00.IN"),
start = 2000, end = 2020, extra = TRUE)
a <- a[a$region != 'Aggregates', ]
library(countrycode)
a$country <- countrycode::countryname(sourcevar = ... |
#' Points to Line
#'
#' Converts XY points to a spatial lines object. Copied from https://rpubs.com/walkerke/points_to_line
#'
#' @param data dataframe containing XY data
#' @param long name of longditude column
#' @param lat name of latitude column
#'
#' @export
points_to_line <- function(data, long, lat, id_field... | /R/func_points_to_line.R | no_license | willdrysdale/wsdmiscr | R | false | false | 1,286 | r | #' Points to Line
#'
#' Converts XY points to a spatial lines object. Copied from https://rpubs.com/walkerke/points_to_line
#'
#' @param data dataframe containing XY data
#' @param long name of longditude column
#' @param lat name of latitude column
#'
#' @export
points_to_line <- function(data, long, lat, id_field... |
library(data.table)
library(lubridate)
library(dplyr)
# set localtime so the days of the week come out in english
Sys.setlocale("LC_TIME", "C")
#load data
fdata="/home/rok/Edjucation/2019.3.28. Data_Science-Specialization/Exploratory Data Analysis/Week 1/ExData_Plotting1/data/household_power_consumption.txt"
data <- ... | /plot3.R | no_license | rokbohinc86/ExData_Plotting1 | R | false | false | 1,227 | r | library(data.table)
library(lubridate)
library(dplyr)
# set localtime so the days of the week come out in english
Sys.setlocale("LC_TIME", "C")
#load data
fdata="/home/rok/Edjucation/2019.3.28. Data_Science-Specialization/Exploratory Data Analysis/Week 1/ExData_Plotting1/data/household_power_consumption.txt"
data <- ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sonar.R
\name{PressureToDepthSaundersFofonoff}
\alias{PressureToDepthSaundersFofonoff}
\title{Pressure To Depth from Saunders and Fofonoff 1976}
\source{
Unesco, 1983
Algorithms for computation of fundamental properties of
seawater, ... | /man/PressureToDepthSaundersFofonoff.Rd | no_license | ctdClub/sonar | R | false | false | 970 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sonar.R
\name{PressureToDepthSaundersFofonoff}
\alias{PressureToDepthSaundersFofonoff}
\title{Pressure To Depth from Saunders and Fofonoff 1976}
\source{
Unesco, 1983
Algorithms for computation of fundamental properties of
seawater, ... |
## https://github.com/niisaban/ProgrammingAssignment2.git
## 1st commit SHA-1 hash identifier: 6adfd9f580a99dba9587ab6a54ff7f61386d74e8
## R Programming Assignment 2: Lexical Scoping
## This assignment "Caches the Inverse of a Matrix"
## functions do
## the makeCacheMatrix() function creates a special "matrix" object ... | /cachematrix.R | no_license | niisaban/ProgrammingAssignment2 | R | false | false | 1,663 | r | ## https://github.com/niisaban/ProgrammingAssignment2.git
## 1st commit SHA-1 hash identifier: 6adfd9f580a99dba9587ab6a54ff7f61386d74e8
## R Programming Assignment 2: Lexical Scoping
## This assignment "Caches the Inverse of a Matrix"
## functions do
## the makeCacheMatrix() function creates a special "matrix" object ... |
# Eric Zhang
# UNI ez2232
# Stat 4400
# HW 2
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#-------------------------------Setup--------------------------------
#-------------------------------------------------------... | /HW 2, Problem 3.R | no_license | ez2232/Stat-Machine-Learning---Fall-2015 | R | false | false | 2,610 | r | # Eric Zhang
# UNI ez2232
# Stat 4400
# HW 2
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#-------------------------------Setup--------------------------------
#-------------------------------------------------------... |
## These two funtions help create a matrix object that is aware of its inverse and returns the inverse when requested ensuring that the calculation is done only if the inverse of the matrix has not been calculated.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- funct... | /cachematrix.R | no_license | aviralbansal/ProgrammingAssignment2 | R | false | false | 1,102 | r | ## These two funtions help create a matrix object that is aware of its inverse and returns the inverse when requested ensuring that the calculation is done only if the inverse of the matrix has not been calculated.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- funct... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{arma_repmat}
\alias{arma_repmat}
\title{arma_repmat}
\usage{
arma_repmat(A, n, m)
}
\arguments{
\item{A}{matrix}
\item{n}{number of repetition in line}
\item{m}{number of repetition in column}
}
\descripti... | /man/arma_repmat.Rd | no_license | rpatin/segclust2d | R | false | true | 397 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{arma_repmat}
\alias{arma_repmat}
\title{arma_repmat}
\usage{
arma_repmat(A, n, m)
}
\arguments{
\item{A}{matrix}
\item{n}{number of repetition in line}
\item{m}{number of repetition in column}
}
\descripti... |
divHelper1 <- function(x, plts, db, grpBy, byPlot){
## Selecting the plots for one county
db$PLOT <- plts[[x]]
### Only joining tables necessary to produce plot level estimates, adjusted for non-response
data <- db$PLOT %>%
left_join(db$COND, by = c('PLT_CN')) %>%
left_join(db$TREE, by = c('PLT_CN', '... | /R/diversityHelper.R | no_license | yangdi1031/rFIA | R | false | false | 7,426 | r | divHelper1 <- function(x, plts, db, grpBy, byPlot){
## Selecting the plots for one county
db$PLOT <- plts[[x]]
### Only joining tables necessary to produce plot level estimates, adjusted for non-response
data <- db$PLOT %>%
left_join(db$COND, by = c('PLT_CN')) %>%
left_join(db$TREE, by = c('PLT_CN', '... |
## Abstract / Executive Summary
## The makeCacheMatrix function caches/persists matrix and inverse matrix values through set
## functions and returns those matrices through corresponding get functions.
## The cacheSolve requests the inverse of a matrix stored/cached in the makeCacheMatrix
## function.
## If the matr... | /cachematrix.R | no_license | TXG8R/ProgrammingAssignment2 | R | false | false | 3,576 | r | ## Abstract / Executive Summary
## The makeCacheMatrix function caches/persists matrix and inverse matrix values through set
## functions and returns those matrices through corresponding get functions.
## The cacheSolve requests the inverse of a matrix stored/cached in the makeCacheMatrix
## function.
## If the matr... |
#' @title Remove Sequences
#' @description Remove sequences not used by samples.
#'
#' @param g a \linkS4class{gtypes} object.
#'
#' @return a new \linkS4class{gtypes} object with unused sequences removed.
#'
#' @author Eric Archer \email{eric.archer@@noaa.gov}
#'
#' @export
#'
removeSequences <- function(g) {
... | /R/removeSequences.R | no_license | cran/strataG | R | false | false | 568 | r | #' @title Remove Sequences
#' @description Remove sequences not used by samples.
#'
#' @param g a \linkS4class{gtypes} object.
#'
#' @return a new \linkS4class{gtypes} object with unused sequences removed.
#'
#' @author Eric Archer \email{eric.archer@@noaa.gov}
#'
#' @export
#'
removeSequences <- function(g) {
... |
context("euclidean")
test_that("euclidean metric works as expected", {
x <- matrix(runif(200), nrow = 100)
# reference results
dist_dist <- dist(x)
dist_mat <- as.matrix(dist_dist)
attr(dist_mat, "dimnames") <- NULL
# check pdist and cdist
expect_equivalent(dist_dist, rdist(x))
expect_eq... | /tests/testthat/test-euclidean.R | no_license | cran/rdist | R | false | false | 1,365 | r | context("euclidean")
test_that("euclidean metric works as expected", {
x <- matrix(runif(200), nrow = 100)
# reference results
dist_dist <- dist(x)
dist_mat <- as.matrix(dist_dist)
attr(dist_mat, "dimnames") <- NULL
# check pdist and cdist
expect_equivalent(dist_dist, rdist(x))
expect_eq... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Hist_Fn.R
\name{Hist_Fn}
\alias{Hist_Fn}
\title{Plot histogram}
\usage{
Hist_Fn(x, freq = TRUE, breaks = "Sturges", y_buffer = 0.05,
ylim = NULL, xlim = NULL, main = "", col = "lightgrey",
bty = "o", add = FALSE, ...)
}
\arguments{
\item{... | /man/Hist_Fn.Rd | no_license | DanOvando/utilities | R | false | true | 711 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Hist_Fn.R
\name{Hist_Fn}
\alias{Hist_Fn}
\title{Plot histogram}
\usage{
Hist_Fn(x, freq = TRUE, breaks = "Sturges", y_buffer = 0.05,
ylim = NULL, xlim = NULL, main = "", col = "lightgrey",
bty = "o", add = FALSE, ...)
}
\arguments{
\item{... |
# Testes do projeto pSkyline
localPskylineFolder = "/home/welder/Documentos/projetos/pskyline"
source(paste(localPskylineFolder, "sphericalDistance.R", sep = "/"))
source(paste(localPskylineFolder, "pSkyline.R", sep = "/"))
probDominanceTest <- function() {
consistencyInFindingTheProbableNearestPointToReference = F... | /testes.R | no_license | welder-oliveira/pskyline | R | false | false | 2,305 | r | # Testes do projeto pSkyline
localPskylineFolder = "/home/welder/Documentos/projetos/pskyline"
source(paste(localPskylineFolder, "sphericalDistance.R", sep = "/"))
source(paste(localPskylineFolder, "pSkyline.R", sep = "/"))
probDominanceTest <- function() {
consistencyInFindingTheProbableNearestPointToReference = F... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/detect_fct.R
\name{detect_fct}
\alias{detect_fct}
\title{Detect Factors}
\usage{
detect_fct(x)
}
\arguments{
\item{x}{factor}
}
\value{
(logical) \code{TRUE} or \code{FALSE}. \code{TRUE} if the length of x is not equal to the length of \code{... | /man/detect_fct.Rd | no_license | xinmiaow/foofactors | R | false | true | 646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/detect_fct.R
\name{detect_fct}
\alias{detect_fct}
\title{Detect Factors}
\usage{
detect_fct(x)
}
\arguments{
\item{x}{factor}
}
\value{
(logical) \code{TRUE} or \code{FALSE}. \code{TRUE} if the length of x is not equal to the length of \code{... |
is.fptl <-
function (obj)
{
if (inherits(obj, "fptl") & is.list(obj) & (length(obj) ==
2))
if (all(unlist(lapply(obj, is.numeric))) & identical(names(obj),
c("x", "y")) & all(is.element(names(attributes(obj)),
c("names", "dp", "Call", "vars", "class"))))
... | /R/is.fptl.R | no_license | cran/fptdApprox | R | false | false | 2,004 | r | is.fptl <-
function (obj)
{
if (inherits(obj, "fptl") & is.list(obj) & (length(obj) ==
2))
if (all(unlist(lapply(obj, is.numeric))) & identical(names(obj),
c("x", "y")) & all(is.element(names(attributes(obj)),
c("names", "dp", "Call", "vars", "class"))))
... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/CVA.r
\name{CVA}
\alias{CVA}
\title{Canonical Variate Analysis}
\usage{
CVA(dataarray, groups, weighting = TRUE, tolinv = 1e-10, plot = TRUE,
rounds = 0, cv = FALSE)
}
\arguments{
\item{dataarray}{Either a k x m x n real array, wher... | /man/CVA.Rd | no_license | zedyautja/Morpho | R | false | false | 6,074 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/CVA.r
\name{CVA}
\alias{CVA}
\title{Canonical Variate Analysis}
\usage{
CVA(dataarray, groups, weighting = TRUE, tolinv = 1e-10, plot = TRUE,
rounds = 0, cv = FALSE)
}
\arguments{
\item{dataarray}{Either a k x m x n real array, wher... |
## Looad library
library(tidyverse)
library(raster)
library(ithir)
library(sp)
library(randomForest)
library(rpart)
library(gstat)
library(caret)
library(lattice)
## Importation de donnees
data<-read_csv2("ex.csv",col_types = cols(Horizon=col_factor(levels = c(1:7))))
data1<-read_csv2("donnees soter.csv",col_types... | /modelisation.R | no_license | morandiaye/Modelisation_Soter_data_Senegal | R | false | false | 4,555 | r | ## Looad library
library(tidyverse)
library(raster)
library(ithir)
library(sp)
library(randomForest)
library(rpart)
library(gstat)
library(caret)
library(lattice)
## Importation de donnees
data<-read_csv2("ex.csv",col_types = cols(Horizon=col_factor(levels = c(1:7))))
data1<-read_csv2("donnees soter.csv",col_types... |
shell_connection_validate_config <- function(config) {
if ("spark.jars.default" %in% names(config)) {
warning("The spark.jars.default config parameter is deprecated, please use sparklyr.jars.default")
config[["sparklyr.jars.default"]] <- config[["spark.jars.default"]]
}
config
}
# create a shell connect... | /R/spark_shell.R | permissive | XMUR/sparklyr | R | false | false | 17,343 | r | shell_connection_validate_config <- function(config) {
if ("spark.jars.default" %in% names(config)) {
warning("The spark.jars.default config parameter is deprecated, please use sparklyr.jars.default")
config[["sparklyr.jars.default"]] <- config[["spark.jars.default"]]
}
config
}
# create a shell connect... |
/Clase 2018-02-21.R | no_license | ActNacho/SoftwareActuarial3 | R | false | false | 2,196 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_get_bucket_policy}
\alias{s3_get_bucket_policy}
\title{Returns the policy of a specified bucket}
\usage{
s3_get_bucket_policy(Bucket)
}
\arguments{
\item{Bucket}{[required] The bucket name for which to get the bucket ... | /cran/paws.storage/man/s3_get_bucket_policy.Rd | permissive | ryanb8/paws | R | false | true | 1,660 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_get_bucket_policy}
\alias{s3_get_bucket_policy}
\title{Returns the policy of a specified bucket}
\usage{
s3_get_bucket_policy(Bucket)
}
\arguments{
\item{Bucket}{[required] The bucket name for which to get the bucket ... |
#'
#' Simulate a FAR(p) process and plot it.
#'
rm(list=ls())
setwd("D:/Poli/TESI/Code/Functional-ARMA-Process")
source("Functions/simulate_FARMA.R")
# FARMA simulation -------------------------------------------------------------
## Parameters ----
# number of basis in each domain
nbasis.1.sim = 5
nbasis.2.sim =... | /Examples/Example_FARMA.R | no_license | Niccolo-Ajroldi/ARMA-Surfaces | R | false | false | 1,849 | r |
#'
#' Simulate a FAR(p) process and plot it.
#'
rm(list=ls())
setwd("D:/Poli/TESI/Code/Functional-ARMA-Process")
source("Functions/simulate_FARMA.R")
# FARMA simulation -------------------------------------------------------------
## Parameters ----
# number of basis in each domain
nbasis.1.sim = 5
nbasis.2.sim =... |
context("CSVY imports/exports")
require("datasets")
test_that("Export to CSVY", {
suppressWarnings(expect_true(export(iris, "iris.csvy") %in% dir()))
unlink("iris.csvy")
})
test_that("Import from CSVY", {
suppressWarnings(d <- import(system.file("examples", "example.csvy", package = "csvy")))
expect_t... | /tests/testthat/test_format_csvy.R | no_license | tonych17/rio | R | false | false | 680 | r | context("CSVY imports/exports")
require("datasets")
test_that("Export to CSVY", {
suppressWarnings(expect_true(export(iris, "iris.csvy") %in% dir()))
unlink("iris.csvy")
})
test_that("Import from CSVY", {
suppressWarnings(d <- import(system.file("examples", "example.csvy", package = "csvy")))
expect_t... |
#Extract tweets. Example-
iphone.tweets = searchTwitter("iphone8", n=2000)
#converts to data frame
df <- do.call("rbind", lapply(iphone.tweets, as.data.frame))
#remove odd characters
df$text <- sapply(df$text,function(row) iconv(row, "latin1", "ASCII", sub="")) #remove emoticon
df$text = gsub("(f|ht)tp(s?)://(.*)[.... | /cleaning_tweets.R | no_license | Hamsini92/Lexical_analysis- | R | false | false | 373 | r | #Extract tweets. Example-
iphone.tweets = searchTwitter("iphone8", n=2000)
#converts to data frame
df <- do.call("rbind", lapply(iphone.tweets, as.data.frame))
#remove odd characters
df$text <- sapply(df$text,function(row) iconv(row, "latin1", "ASCII", sub="")) #remove emoticon
df$text = gsub("(f|ht)tp(s?)://(.*)[.... |
library(OneR)
### Name: maxlevels
### Title: Remove factors with too many levels
### Aliases: maxlevels
### ** Examples
df <- data.frame(numeric = c(1:26), alphabet = letters)
str(df)
str(maxlevels(df))
| /data/genthat_extracted_code/OneR/examples/maxlevels.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 210 | r | library(OneR)
### Name: maxlevels
### Title: Remove factors with too many levels
### Aliases: maxlevels
### ** Examples
df <- data.frame(numeric = c(1:26), alphabet = letters)
str(df)
str(maxlevels(df))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.