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 |
|---|---|---|---|---|---|---|---|---|---|
#' Create a Profiling Version of a Data Set
#'
#' `step_profile` creates a *specification* of a recipe step that
#' will fix the levels of all variables but one and will create a
#' sequence of values for the remaining variable. This step can be
#' helpful when creating partial regression plots for additive
#' mode... | /R/profile.R | no_license | EdwinTh/recipes | R | false | false | 10,397 | r | #' Create a Profiling Version of a Data Set
#'
#' `step_profile` creates a *specification* of a recipe step that
#' will fix the levels of all variables but one and will create a
#' sequence of values for the remaining variable. This step can be
#' helpful when creating partial regression plots for additive
#' mode... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input.R
\docType{data}
\name{mixedOptions.multiple}
\alias{mixedOptions.multiple}
\title{Get the multiple (non-mutually-exclusive) option type for \code{mixedOptionsInput}.}
\format{An object of class \code{character} of length 1.}
\usage{
mi... | /man/mixedOptions.multiple.Rd | permissive | mtrybulec/interviewer | R | false | true | 608 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input.R
\docType{data}
\name{mixedOptions.multiple}
\alias{mixedOptions.multiple}
\title{Get the multiple (non-mutually-exclusive) option type for \code{mixedOptionsInput}.}
\format{An object of class \code{character} of length 1.}
\usage{
mi... |
load(paste0(dump.dir,"alt.MGMT.Rdata"))
#head(alt.MGMT1)
library(reshape2)
library(ggplot2)
alt.MGMT1[,2]=c(rep(0,5),rep(c(rep("20 %",5),rep("40 %",5),rep("60 %",5),rep("90 %",5)),4))
alt.MGMT1[,1]=c(rep("No Action",5),rep("3 Year",20),rep("1 Year",20),rep("Sterilize",20),rep("Cull",20))
colnames(alt.MGMT1) <- c("Tre... | /Code_Raiho_et_al_2015/Deer_Draw_Plots.R | no_license | araiho/Deer | R | false | false | 2,172 | r | load(paste0(dump.dir,"alt.MGMT.Rdata"))
#head(alt.MGMT1)
library(reshape2)
library(ggplot2)
alt.MGMT1[,2]=c(rep(0,5),rep(c(rep("20 %",5),rep("40 %",5),rep("60 %",5),rep("90 %",5)),4))
alt.MGMT1[,1]=c(rep("No Action",5),rep("3 Year",20),rep("1 Year",20),rep("Sterilize",20),rep("Cull",20))
colnames(alt.MGMT1) <- c("Tre... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticsearchservice_operations.R
\name{elasticsearchservice_purchase_reserved_elasticsearch_instance_offering}
\alias{elasticsearchservice_purchase_reserved_elasticsearch_instance_offering}
\title{Allows you to purchase reserved Elasticsearc... | /paws/man/elasticsearchservice_purchase_reserved_elasticsearch_instance_offering.Rd | permissive | johnnytommy/paws | R | false | true | 1,099 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticsearchservice_operations.R
\name{elasticsearchservice_purchase_reserved_elasticsearch_instance_offering}
\alias{elasticsearchservice_purchase_reserved_elasticsearch_instance_offering}
\title{Allows you to purchase reserved Elasticsearc... |
#' A data dictionary describing dbGaP metadata variables
#'
#' A data dictionary containing descriptions of the metadata variables attached
#' using the \code{\link{attach_dbGaP}} method, as translated from dbGaP
#' \code{XLM} data dictionary files.
#'
#' @format A \code{data.frame} with 789 rows and 8 variables:
#' \d... | /R/dictionary.R | permissive | khemlalnirmalkar/HMP16SData | R | false | false | 5,029 | r | #' A data dictionary describing dbGaP metadata variables
#'
#' A data dictionary containing descriptions of the metadata variables attached
#' using the \code{\link{attach_dbGaP}} method, as translated from dbGaP
#' \code{XLM} data dictionary files.
#'
#' @format A \code{data.frame} with 789 rows and 8 variables:
#' \d... |
## Twitter Analysis
library(tm)
library(twitteR)
library(data.table)
tokens = character()
fileName <- "./SocialTextFiles/TwitterAuth.txt"
conn <- file(fileName,open="r")
linn <-readLines(conn)
close(conn)
consumer_key <- strsplit(linn[1],':')[[1]][2]
consumer_secret <- strsplit(linn[2],':')[[1]][2]
access_token <- s... | /TableauAnalytics/twitterScrape.R | no_license | mpastor2017/DataScience | R | false | false | 1,829 | r | ## Twitter Analysis
library(tm)
library(twitteR)
library(data.table)
tokens = character()
fileName <- "./SocialTextFiles/TwitterAuth.txt"
conn <- file(fileName,open="r")
linn <-readLines(conn)
close(conn)
consumer_key <- strsplit(linn[1],':')[[1]][2]
consumer_secret <- strsplit(linn[2],':')[[1]][2]
access_token <- s... |
Q20200629_1u <- function() {
# generate data with insignificant Levene test
iDigits <- 3
qtype= "num"
Sample <- Q20200605_1nw_core()
dAlpha <- sample(c(0.01,0.05,0.10), 1)
iN <- nrow(Sample)
dMean <- mean(Sample$Sample1)
dSd <- sd(Sample$Sample1)
iNullValue <- round(dMean + sample(c(-1,1),1) * dSd ... | /questions/Q20200629_1u.R | no_license | alucas69/CanvasQuizR | R | false | false | 1,420 | r | Q20200629_1u <- function() {
# generate data with insignificant Levene test
iDigits <- 3
qtype= "num"
Sample <- Q20200605_1nw_core()
dAlpha <- sample(c(0.01,0.05,0.10), 1)
iN <- nrow(Sample)
dMean <- mean(Sample$Sample1)
dSd <- sd(Sample$Sample1)
iNullValue <- round(dMean + sample(c(-1,1),1) * dSd ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iscam_addtnorm.R
\name{iscam_addtnorm}
\alias{iscam_addtnorm}
\title{iscam_addtnorm Function}
\usage{
iscam_addtnorm(x, df)
}
\arguments{
\item{x}{a vector of numeric values.}
\item{df}{degrees of freedom}
}
\description{
This function creat... | /ISCAM/man/iscam_addtnorm.Rd | no_license | shannonpileggi/SP--Pablo--RProgramming | R | false | true | 501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iscam_addtnorm.R
\name{iscam_addtnorm}
\alias{iscam_addtnorm}
\title{iscam_addtnorm Function}
\usage{
iscam_addtnorm(x, df)
}
\arguments{
\item{x}{a vector of numeric values.}
\item{df}{degrees of freedom}
}
\description{
This function creat... |
## Funkcja licząca indeksy akustyczne. Liczone indexy: H, Ht, Hs, ACI.
require(tuneR)
require(seewave)
htrgnt_sound <- function(sound){
# Wektory do umiejscowienia obliczanych wartości danych (niby tak jest szybicej)
ACI <- as.vector(NA, "numeric")
TH <- as.vector(NA, "numeric")
SH <- as.vector(... | /functions/htrgnt_sound.R | no_license | zielinskipp/Indices_behaviour | R | false | false | 703 | r | ## Funkcja licząca indeksy akustyczne. Liczone indexy: H, Ht, Hs, ACI.
require(tuneR)
require(seewave)
htrgnt_sound <- function(sound){
# Wektory do umiejscowienia obliczanych wartości danych (niby tak jest szybicej)
ACI <- as.vector(NA, "numeric")
TH <- as.vector(NA, "numeric")
SH <- as.vector(... |
## ----, kNNExample, cache=FALSE-------------------------------------------
kNN_EstimationProcedure <- function(k, learningSet) {
learningInput <- learningSet[, -1]
learningResponse <- learningSet[, 1]
function(newdata) {
class::knn(train = learningInput,
cl = learningResponse,
... | /data/genthat_extracted_code/boostr/vignettes/boostr_user_inputs.R | no_license | surayaaramli/typeRrh | R | false | false | 4,199 | r |
## ----, kNNExample, cache=FALSE-------------------------------------------
kNN_EstimationProcedure <- function(k, learningSet) {
learningInput <- learningSet[, -1]
learningResponse <- learningSet[, 1]
function(newdata) {
class::knn(train = learningInput,
cl = learningResponse,
... |
## Cache the inverse of a matrix
## This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL #initialise inverse as null
#set the value of the matrix
set <- function(y){
x <<- y
inv <<- NULL
}
#g... | /cachematrix.R | no_license | bhanlam/ProgrammingAssignment2 | R | false | false | 1,310 | r | ## Cache the inverse of a matrix
## This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL #initialise inverse as null
#set the value of the matrix
set <- function(y){
x <<- y
inv <<- NULL
}
#g... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apollo_validateHBControl.R
\name{apollo_validateHBControl}
\alias{apollo_validateHBControl}
\title{Validates the \code{apollo_HB} list of parameters}
\usage{
apollo_validateHBControl(
apollo_HB,
apollo_beta,
apollo_fixed,
apollo_contr... | /man/apollo_validateHBControl.Rd | no_license | cran/apollo | R | false | true | 3,620 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apollo_validateHBControl.R
\name{apollo_validateHBControl}
\alias{apollo_validateHBControl}
\title{Validates the \code{apollo_HB} list of parameters}
\usage{
apollo_validateHBControl(
apollo_HB,
apollo_beta,
apollo_fixed,
apollo_contr... |
\name{learnPartitionWithLLR}
\alias{learnPartitionWithLLR}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function to learn a rule in case of 2 classes or more
}
\description{
A function to learn a rule in case of 2 classes or more.
There are reduction dimension methods (accessible vi... | /man/learnPartitionWithLLR.Rd | no_license | robingirard/VHDClassification | R | false | false | 1,912 | rd | \name{learnPartitionWithLLR}
\alias{learnPartitionWithLLR}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function to learn a rule in case of 2 classes or more
}
\description{
A function to learn a rule in case of 2 classes or more.
There are reduction dimension methods (accessible vi... |
#### variables for rawDataset() -- probably not very useful
## original variables
origVars <- reactive({
dataset <- rawDataset(); if (is.null(dataset)) return()
colnames(dataset)
})
## original factor variables
origFactorVars <- reactive({
dataset <- rawDataset(); if (is.null(dataset)) return()
getFactorVarNa... | /inst/visualToolkit/reactives/reactives.R | permissive | VisualExploreR/shinyDE | R | false | false | 5,249 | r | #### variables for rawDataset() -- probably not very useful
## original variables
origVars <- reactive({
dataset <- rawDataset(); if (is.null(dataset)) return()
colnames(dataset)
})
## original factor variables
origFactorVars <- reactive({
dataset <- rawDataset(); if (is.null(dataset)) return()
getFactorVarNa... |
test_that("generate_wrap_sl_lib works as expected.", {
wrap_result <- gen_wrap_sl_lib(lib_name = "m_xgboost",
params = list(xgb_max_depth = c(4),
xgb_nrounds=c(20)),
nthread = 1)
expect_equal(length(wrap_result), 2L)
# expect... | /tests/testthat/test-generate_wrap_sl_lib.R | no_license | wxwx1993/GPSmatching | R | false | false | 1,702 | r | test_that("generate_wrap_sl_lib works as expected.", {
wrap_result <- gen_wrap_sl_lib(lib_name = "m_xgboost",
params = list(xgb_max_depth = c(4),
xgb_nrounds=c(20)),
nthread = 1)
expect_equal(length(wrap_result), 2L)
# expect... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/entropyS.R
\name{entropyS}
\alias{entropyS}
\title{Gibbs Entropy}
\usage{
entropyS(omega, tau, X, beta = 1, pi_bm)
}
\arguments{
\item{omega}{is a (symmetrical) matrix with the strength of connection between each nodes. Set the the diagonal t... | /man/entropyS.Rd | no_license | BenjiUvA/Learning_Ising_Model | R | false | true | 633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/entropyS.R
\name{entropyS}
\alias{entropyS}
\title{Gibbs Entropy}
\usage{
entropyS(omega, tau, X, beta = 1, pi_bm)
}
\arguments{
\item{omega}{is a (symmetrical) matrix with the strength of connection between each nodes. Set the the diagonal t... |
context("Unit detection and conversion")
test_that("flowunit() methods for lfobj and xts exist", {
data("ngaruroro")
ng <- as.xts(ngaruroro)
expect_equal(flowunit(ngaruroro), "m^3/s")
expect_equal(flowunit(ng), "m^3/s")
})
test_that("units for lfobj and xts objects can be modified", {
data("ngar... | /data/genthat_extracted_code/lfstat/tests/test-unit.R | no_license | surayaaramli/typeRrh | R | false | false | 1,807 | r | context("Unit detection and conversion")
test_that("flowunit() methods for lfobj and xts exist", {
data("ngaruroro")
ng <- as.xts(ngaruroro)
expect_equal(flowunit(ngaruroro), "m^3/s")
expect_equal(flowunit(ng), "m^3/s")
})
test_that("units for lfobj and xts objects can be modified", {
data("ngar... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{getLearnerModel}
\alias{getLearnerModel}
\title{Get underlying R model of learner integrated into mlr.}
\usage{
getLearnerModel(model)
}
\arguments{
\item{model}{[\code{\link{WrappedModel}}]\cr
The model, returned by e.g., \code{\link{train}}.}
}
\value{
[any].... | /man/getLearnerModel.Rd | no_license | narayana1208/mlr | R | false | false | 540 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{getLearnerModel}
\alias{getLearnerModel}
\title{Get underlying R model of learner integrated into mlr.}
\usage{
getLearnerModel(model)
}
\arguments{
\item{model}{[\code{\link{WrappedModel}}]\cr
The model, returned by e.g., \code{\link{train}}.}
}
\value{
[any].... |
wd <- "~/GitHub/West-Nile-Virus-Prediction"
setwd(wd)
# read in the training file and prepare for combining with test.
train <- read.csv("train.csv", as.is = TRUE)
train$Source <- "Train"
train$Id <- 0
# read in the test file and prepare for combining with train.
test <- read.csv("test.csv", as.is = TRUE)
test$Sourc... | /process_data.R | no_license | Sandy4321/West-Nile-Virus-Prediction | R | false | false | 1,053 | r | wd <- "~/GitHub/West-Nile-Virus-Prediction"
setwd(wd)
# read in the training file and prepare for combining with test.
train <- read.csv("train.csv", as.is = TRUE)
train$Source <- "Train"
train$Id <- 0
# read in the test file and prepare for combining with train.
test <- read.csv("test.csv", as.is = TRUE)
test$Sourc... |
/incidenciamazatlan.R | no_license | naimmanriquez/Estadistica_R_Tecmilenio | R | false | false | 3,847 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eventData.R
\docType{methods}
\name{fit}
\alias{fit}
\alias{fit,EventData-method}
\title{Fit a survival model to an EventData object}
\usage{
\S4method{fit}{EventData}(object, dist = "weibull")
}
\arguments{
\item{object}{an EventData object}... | /man/fit-methods.Rd | no_license | 17-3/eventPrediction | R | false | true | 546 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eventData.R
\docType{methods}
\name{fit}
\alias{fit}
\alias{fit,EventData-method}
\title{Fit a survival model to an EventData object}
\usage{
\S4method{fit}{EventData}(object, dist = "weibull")
}
\arguments{
\item{object}{an EventData object}... |
% File man/testMeanSubsets.Rd
% Part of the EASI package, https://github.com/cwendorf/EASI
\name{testMeanSubsets}
\alias{testMeanSubsets}
\alias{testMeanSubsets.default}
\alias{testMeanSubsets.formula}
\alias{testMeanSubsets.wss}
\alias{testMeanSubsets.bss}
\title{Test Mean Subsets}
\description{Provides the statistic... | /man/testMeanSubsets.Rd | permissive | cwendorf/EASI | R | false | false | 2,100 | rd | % File man/testMeanSubsets.Rd
% Part of the EASI package, https://github.com/cwendorf/EASI
\name{testMeanSubsets}
\alias{testMeanSubsets}
\alias{testMeanSubsets.default}
\alias{testMeanSubsets.formula}
\alias{testMeanSubsets.wss}
\alias{testMeanSubsets.bss}
\title{Test Mean Subsets}
\description{Provides the statistic... |
#Calculate chemical summary for surface water pesticide data
# tox_list_surface <- create_toxEval(file_in(file.path(path_to_data, "ToxEvalFiles/WQ_pesticides.xlsx")))
#R objects
chemicalSummary_surface #Sam's data from surface
chemicalSummary_bench_surface # Sam's surface data using custom benchmarks
#Check out the... | /Plot_SurfaceTox_2016_summerdata.R | no_license | lukeloken/passive_tox | R | false | false | 27,881 | r |
#Calculate chemical summary for surface water pesticide data
# tox_list_surface <- create_toxEval(file_in(file.path(path_to_data, "ToxEvalFiles/WQ_pesticides.xlsx")))
#R objects
chemicalSummary_surface #Sam's data from surface
chemicalSummary_bench_surface # Sam's surface data using custom benchmarks
#Check out the... |
library(hierfstat)
library(readxl)
alcon <- read.delim('/home/jonas/Documents/Masterthesis/thesis/data/Analyses/Vegan/alconSNP', h = T, sep = "\t")
gentian <- read.delim('/home/jonas/Documents/Masterthesis/thesis/data/Analyses/Vegan/gentianSNP', h = T, sep = "\t")
#conversion to hierfstat format (two alleles in 1 colu... | /AR2.R | no_license | JWarson/Masterthesis | R | false | false | 12,795 | r | library(hierfstat)
library(readxl)
alcon <- read.delim('/home/jonas/Documents/Masterthesis/thesis/data/Analyses/Vegan/alconSNP', h = T, sep = "\t")
gentian <- read.delim('/home/jonas/Documents/Masterthesis/thesis/data/Analyses/Vegan/gentianSNP', h = T, sep = "\t")
#conversion to hierfstat format (two alleles in 1 colu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeRespVsRespDataFrame.R
\name{makeRespVsRespDataFrame}
\alias{makeRespVsRespDataFrame}
\title{Make a RespVsResp data frame}
\usage{
makeRespVsRespDataFrame(con, drugs, cell_lines, resp_type = "ccle",
tissue_info = "ccle", drug_df = NULL)
... | /man/makeRespVsRespDataFrame.Rd | no_license | richchien/CancerCellLines | R | false | true | 1,014 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeRespVsRespDataFrame.R
\name{makeRespVsRespDataFrame}
\alias{makeRespVsRespDataFrame}
\title{Make a RespVsResp data frame}
\usage{
makeRespVsRespDataFrame(con, drugs, cell_lines, resp_type = "ccle",
tissue_info = "ccle", drug_df = NULL)
... |
## version: 1.26
## method: delete
## path: /images/{name}
## code: 200
## response: [{"Untagged":"3e2f21a89f"},{"Deleted":"3e2f21a89f"},{"Deleted":"53b4f83ac9"}]
data.frame(
untagged = c("3e2f21a89f", NA_character_, NA_character_),
deleted = c(NA_character_, "3e2f21a89f", "53b4f83ac9"),
stringsAsFactors = FALSE)... | /tests/testthat/sample_responses/v1.26/image_delete.R | no_license | cran/stevedore | R | false | false | 321 | r | ## version: 1.26
## method: delete
## path: /images/{name}
## code: 200
## response: [{"Untagged":"3e2f21a89f"},{"Deleted":"3e2f21a89f"},{"Deleted":"53b4f83ac9"}]
data.frame(
untagged = c("3e2f21a89f", NA_character_, NA_character_),
deleted = c(NA_character_, "3e2f21a89f", "53b4f83ac9"),
stringsAsFactors = FALSE)... |
library(ape)
testtree <- read.tree("1767_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1767_2_unrooted.txt") | /codeml_files/newick_trees_processed/1767_2/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("1767_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1767_2_unrooted.txt") |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dst_date_parse.R
\name{dst_date_parse}
\alias{dst_date_parse}
\title{Helper function to parse the dates from the statbank.}
\usage{
dst_date_parse(dst_date)
}
\arguments{
\item{A}{vector of length one or more with date formats like
19... | /man/dst_date_parse.Rd | no_license | ekstroem/dkstat | R | false | false | 428 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dst_date_parse.R
\name{dst_date_parse}
\alias{dst_date_parse}
\title{Helper function to parse the dates from the statbank.}
\usage{
dst_date_parse(dst_date)
}
\arguments{
\item{A}{vector of length one or more with date formats like
19... |
# mkdir$ --- create a subdirectory
integer function mkdir$ (name, owner, non_owner)
character name (ARB), owner (ARB), non_owner (ARB)
integer newdir (16), opw (3), npw (3), attach, code, i, junk (3)
integer getto, findf$, ctop
mkdir$ = ERR
do i = 1, 3; {
opw (i) = " "
npw (i) = " "
... | /swt/src/lib/swt/src/mkdir$.r | no_license | arnoldrobbins/gt-swt | R | false | false | 764 | r | # mkdir$ --- create a subdirectory
integer function mkdir$ (name, owner, non_owner)
character name (ARB), owner (ARB), non_owner (ARB)
integer newdir (16), opw (3), npw (3), attach, code, i, junk (3)
integer getto, findf$, ctop
mkdir$ = ERR
do i = 1, 3; {
opw (i) = " "
npw (i) = " "
... |
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
withMathJax(),
# Application title
titlePanel(HTML("<b> <font size='6'> Evaluate the trustworthiness of your study!</font> </b>")),
fluidRow(
column(8, h4("This application is based on the research program strategy (RPS... | /AppCodeRPS.R | no_license | Akrefeld/ResearchProgramStrategy | R | false | false | 19,221 | r |
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
withMathJax(),
# Application title
titlePanel(HTML("<b> <font size='6'> Evaluate the trustworthiness of your study!</font> </b>")),
fluidRow(
column(8, h4("This application is based on the research program strategy (RPS... |
#' @title Load or attach 'RAVE' subject
#' @name rave_load
#' @description Load or attach 'RAVE' a subject to current analysis context.
#' The goal is to allow analysis and visualization to be focused on one that
#' subject.
#' @param x either \code{\link{RAVERepository}}, \code{\link{RAVESubject}}
#' instance or chara... | /R/core-repo_loader.R | no_license | dipterix/ravebase | R | false | false | 10,168 | r | #' @title Load or attach 'RAVE' subject
#' @name rave_load
#' @description Load or attach 'RAVE' a subject to current analysis context.
#' The goal is to allow analysis and visualization to be focused on one that
#' subject.
#' @param x either \code{\link{RAVERepository}}, \code{\link{RAVESubject}}
#' instance or chara... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bt_update_library.R
\name{bt_update_library}
\alias{bt_update_library}
\title{Get the latest version from GitHub.}
\usage{
bt_update_library(x)
}
\value{
Be up to date with our latest functions.
}
\description{
Syncs your local library with o... | /man/bt_update_library.Rd | no_license | global-trade-alert/gtabastiat | R | false | true | 422 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bt_update_library.R
\name{bt_update_library}
\alias{bt_update_library}
\title{Get the latest version from GitHub.}
\usage{
bt_update_library(x)
}
\value{
Be up to date with our latest functions.
}
\description{
Syncs your local library with o... |
prediction_accuracy <- function(X_pred, Y_pred, parameter){
model.predictions <- model_prediction(X_pred, parameter)
accuracy.predictions = sum(model.predictions == Y_pred)/length(model.predictions)
return(accuracy.predictions)
} | /source/prediction_accuracy.R | no_license | sumeetpalsingh/GERAS2017 | R | false | false | 235 | r | prediction_accuracy <- function(X_pred, Y_pred, parameter){
model.predictions <- model_prediction(X_pred, parameter)
accuracy.predictions = sum(model.predictions == Y_pred)/length(model.predictions)
return(accuracy.predictions)
} |
#Lecture 9, Multiple Regression in R
#Segment 1
library(psych)
endur <- read.table('stats1_ex04.txt', header=T)
colnames(endur)[1] <- 'pid'
names(endur)
#examine a scatterplot
plot(endur$endurance ~ endur$age, main ='Scatterplot', ylab ='Endurance',xlab='Age')
abline(lm(endur$endurance ~ endur$age),col='blue'... | /0. Statistics One/lecture9.1-multipleregression.R | no_license | josepotal/StatisticsOne | R | false | false | 738 | r | #Lecture 9, Multiple Regression in R
#Segment 1
library(psych)
endur <- read.table('stats1_ex04.txt', header=T)
colnames(endur)[1] <- 'pid'
names(endur)
#examine a scatterplot
plot(endur$endurance ~ endur$age, main ='Scatterplot', ylab ='Endurance',xlab='Age')
abline(lm(endur$endurance ~ endur$age),col='blue'... |
#'
#'@title Run tests.
#'
testPlotMap.CSV<-function(){
res<-plotMap.CSV(psFile='tstRotFALSE',year=2009,col='legalret',title="legal, retained",
rotate=FALSE,blocktype='SUM',plt_blocktype='COARSE',plt_blocklocations=TRUE,
plt_title=TRUE,plt_stations=TRUE,plt_bars=TRUE,plt_surface=TRUE,plt... | /R/testPlotMap.CSV.R | permissive | Libardo1/wtsGMT | R | false | false | 917 | r | #'
#'@title Run tests.
#'
testPlotMap.CSV<-function(){
res<-plotMap.CSV(psFile='tstRotFALSE',year=2009,col='legalret',title="legal, retained",
rotate=FALSE,blocktype='SUM',plt_blocktype='COARSE',plt_blocklocations=TRUE,
plt_title=TRUE,plt_stations=TRUE,plt_bars=TRUE,plt_surface=TRUE,plt... |
# Load library packages
library(readxl)
library(dplyr)
library(lubridate)
library(ggplot2)
# Set working directory
setwd("C:/Users/PB/SkyDrive/DataScience/MAF - Marathon Training")
# Import sheet names
FileName <- "MAFtrackrecord.xlsx"
SheetNames <- excel_sheets(FileName)
# The palette with grey:
cbPalette <- c("#... | /MAFtraining.R | no_license | pjbaudin/RunningMAF | R | false | false | 12,451 | r | # Load library packages
library(readxl)
library(dplyr)
library(lubridate)
library(ggplot2)
# Set working directory
setwd("C:/Users/PB/SkyDrive/DataScience/MAF - Marathon Training")
# Import sheet names
FileName <- "MAFtrackrecord.xlsx"
SheetNames <- excel_sheets(FileName)
# The palette with grey:
cbPalette <- c("#... |
## Sandalone file containing all functions and code to simulate realization data
library(RandomFields)
# Functions ---------------------------------------------------------------
## Functions to numerically determine rho value that produces desired xi
rho_root <- function(rho, xi, smooth, rng, var) {
model <- R... | /sim/simulate_s2.5.R | permissive | joshhjacobson/FTE | R | false | false | 4,516 | r |
## Sandalone file containing all functions and code to simulate realization data
library(RandomFields)
# Functions ---------------------------------------------------------------
## Functions to numerically determine rho value that produces desired xi
rho_root <- function(rho, xi, smooth, rng, var) {
model <- R... |
#' Set up base syntax file.
#' @keywords internal
setupBaseSyntax <- function(paths, varLabels, ctrlOpts){
#-------------------------------------------------------------#
# NULL MODEL CONTAINS
#-------------------------------------------------------------#
# Cov & Var among variables than cannot b... | /gimme/R/setupBaseSyntax.R | no_license | zackfisher/gimme | R | false | false | 2,229 | r | #' Set up base syntax file.
#' @keywords internal
setupBaseSyntax <- function(paths, varLabels, ctrlOpts){
#-------------------------------------------------------------#
# NULL MODEL CONTAINS
#-------------------------------------------------------------#
# Cov & Var among variables than cannot b... |
library(readxl)
library(rpart)
library(rpart.plot)
data <- read_excel("ind.xlsx")
control = rpart.control(minsplit=0, maxdepth = 30)
model <- rpart(traffic~day+weather+time, data, control=control)
rpart.plot(model)
pred <- predict(model, data, type="class")
entropy <- function(weight, prob1, prob2){
ret... | /Simple Machine Learning Assignment/Assignment 3 - Tree Classifier/Calculation/calculation.R | no_license | oskird/Data-Analytics-project-Imperial-College | R | false | false | 1,365 | r | library(readxl)
library(rpart)
library(rpart.plot)
data <- read_excel("ind.xlsx")
control = rpart.control(minsplit=0, maxdepth = 30)
model <- rpart(traffic~day+weather+time, data, control=control)
rpart.plot(model)
pred <- predict(model, data, type="class")
entropy <- function(weight, prob1, prob2){
ret... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allCladeMembers.R
\name{allCladeMembers}
\alias{allCladeMembers}
\title{allCladeMembers (internal function)}
\usage{
allCladeMembers(phy)
}
\arguments{
\item{phy}{phylogeny in ape phylo format}
}
\value{
cladeMembersMatrix
}
\description{
Thi... | /man/allCladeMembers.Rd | no_license | cran/motmot.2.0 | R | false | true | 409 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allCladeMembers.R
\name{allCladeMembers}
\alias{allCladeMembers}
\title{allCladeMembers (internal function)}
\usage{
allCladeMembers(phy)
}
\arguments{
\item{phy}{phylogeny in ape phylo format}
}
\value{
cladeMembersMatrix
}
\description{
Thi... |
file.blogs <- "en_US/en_US.blogs.txt" # blog.txt file
file.twitter <- "en_US/en_US.twitter.txt" # twitter.txt file
file.news <- "en_US/en_US.news.txt" # news.txt file
# read files
connect <- file(file.blogs, open="rb")
blogs <- readLines(connect, encoding="UTF-8"); close(connect)
connect <- file(file.twitter, open="rb... | /ModelingB.R | no_license | nkuraeva/Data-Science-R-Cupstone | R | false | false | 1,307 | r | file.blogs <- "en_US/en_US.blogs.txt" # blog.txt file
file.twitter <- "en_US/en_US.twitter.txt" # twitter.txt file
file.news <- "en_US/en_US.news.txt" # news.txt file
# read files
connect <- file(file.blogs, open="rb")
blogs <- readLines(connect, encoding="UTF-8"); close(connect)
connect <- file(file.twitter, open="rb... |
\name{inpboxe4k}
\alias{inpboxe4k}
\title{Input Box with four edit boxes and a check box}
\description{Input box for multiple inputs}
\usage{inpboxe4k(vlabel, inp)}
\arguments{
\item{vlabel }{character vector with the text label of the box}
\item{inp }{character vector with the initialization}
}
\details{S... | /man/inpboxe4k.Rd | no_license | cran/MenuCollection | R | false | false | 846 | rd | \name{inpboxe4k}
\alias{inpboxe4k}
\title{Input Box with four edit boxes and a check box}
\description{Input box for multiple inputs}
\usage{inpboxe4k(vlabel, inp)}
\arguments{
\item{vlabel }{character vector with the text label of the box}
\item{inp }{character vector with the initialization}
}
\details{S... |
#' Clean raw text
#'
#' @param rawText a single string literal
#' @param removeStopwords omit closed-class words - 'stopwords'
#' @return a new string literal, with sentence marker, no punctation, etc.
.packageName <- 'crqa_nlp'
clean_text = function(rawText,removeStopwords=F) {
rawText = Corpus(VectorSource(rawT... | /R/clean_text.R | no_license | racdale/crqanlp | R | false | false | 812 | r | #' Clean raw text
#'
#' @param rawText a single string literal
#' @param removeStopwords omit closed-class words - 'stopwords'
#' @return a new string literal, with sentence marker, no punctation, etc.
.packageName <- 'crqa_nlp'
clean_text = function(rawText,removeStopwords=F) {
rawText = Corpus(VectorSource(rawT... |
#===============================================================================
# Load libraries
#===============================================================================
# library(phyloseq)
library(DESeq2)
library("BiocParallel")
register(MulticoreParam(12))
library(data.table)
library(plyr)
library(dpl... | /ARD/HG/2016/analysis.R | no_license | harrisonlab/Metabarcoding_projects | R | false | false | 9,887 | r | #===============================================================================
# Load libraries
#===============================================================================
# library(phyloseq)
library(DESeq2)
library("BiocParallel")
register(MulticoreParam(12))
library(data.table)
library(plyr)
library(dpl... |
\name{InterSV.Equality}
\alias{InterSV.Equality}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Test for Equality of Inter-Subject Variabilities
}
\description{
H0: between-subject variance of treatment T is equal to between-subject variance of treatment R
Ha: not equal
The te... | /man/InterSV.Equality.Rd | no_license | cran/TrialSize | R | false | false | 1,039 | rd | \name{InterSV.Equality}
\alias{InterSV.Equality}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Test for Equality of Inter-Subject Variabilities
}
\description{
H0: between-subject variance of treatment T is equal to between-subject variance of treatment R
Ha: not equal
The te... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 33042
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 33042
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/incrementer-encoder/incrementer-enc07-uni... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/incrementer-encoder/incrementer-enc07-uniform-depth-17/incrementer-enc07-uniform-depth-17.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 704 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 33042
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 33042
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/incrementer-encoder/incrementer-enc07-uni... |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | /R/pkg/tests/fulltests/test_sparkSQL.R | permissive | liyafan82/spark | R | false | false | 154,358 | r | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cairo-font-options.R
\name{cairo_font_options_merge}
\alias{cairo_font_options_merge}
\title{cairo_font_options_merge}
\usage{
cairo_font_options_merge(options, other)
}
\arguments{
\item{options}{[\code{cairo_font_options_t *}] a #cairo_font... | /man/cairo_font_options_merge.Rd | permissive | coolbutuseless/cairocore | R | false | true | 1,585 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cairo-font-options.R
\name{cairo_font_options_merge}
\alias{cairo_font_options_merge}
\title{cairo_font_options_merge}
\usage{
cairo_font_options_merge(options, other)
}
\arguments{
\item{options}{[\code{cairo_font_options_t *}] a #cairo_font... |
plot_facet_heatmaps2 <- function(d,
outdir='.',
files=NULL,
slimList=NULL){
great_heatmap <- make_great_heatmap(indir=indir,
outdir=outdir,
... | /R/plot_facet_heatmaps2.R | permissive | guillaumecharbonnier/greatr | R | false | false | 11,474 | r | plot_facet_heatmaps2 <- function(d,
outdir='.',
files=NULL,
slimList=NULL){
great_heatmap <- make_great_heatmap(indir=indir,
outdir=outdir,
... |
rm(list=ls())
file <-"household_power_consumption.txt"
rawdata <- read.table(file, sep=";", header=TRUE)
rawdata[,1]<- as.Date(as.character(rawdata[,1]), "%d/%m/%Y")
data <- rawdata[which(rawdata$Date %in% as.Date(c("2007-02-02","2007-02-01"))),]
data$DateTime <- as.POSIXct(paste(data$Date, data$Time),
... | /R/plot1.R | no_license | sonali-bioc/ExData_Plotting1 | R | false | false | 544 | r | rm(list=ls())
file <-"household_power_consumption.txt"
rawdata <- read.table(file, sep=";", header=TRUE)
rawdata[,1]<- as.Date(as.character(rawdata[,1]), "%d/%m/%Y")
data <- rawdata[which(rawdata$Date %in% as.Date(c("2007-02-02","2007-02-01"))),]
data$DateTime <- as.POSIXct(paste(data$Date, data$Time),
... |
this.dir <- dirname(parent.frame(2)$ofile)
setwd(this.dir)
dataset <- function () {
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileurl, destfile="./data.zip", method="curl")
system("unzip -d ./ ./data.zip")
system("mv ./'UCI HAR ... | /run_analysis.R | no_license | dainiuxt/Getting-and-Cleaning-Data | R | false | false | 1,912 | r | this.dir <- dirname(parent.frame(2)$ofile)
setwd(this.dir)
dataset <- function () {
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileurl, destfile="./data.zip", method="curl")
system("unzip -d ./ ./data.zip")
system("mv ./'UCI HAR ... |
mzipBvs <- function(Y,
lin.pred,
data,
model="generalized",
offset = NULL,
hyperParams,
startValues,
mcmcParams)
{
numReps <- mcmcParams$run$numReps
thin <- mcmcParams$run$thin
burninPerc <- mcmcParams$run$burninPerc
nStore <- numReps/thin * (1 - burninPerc)
if((numReps / thin... | /R/mzipBvs.R | no_license | cran/mBvs | R | false | false | 24,526 | r |
mzipBvs <- function(Y,
lin.pred,
data,
model="generalized",
offset = NULL,
hyperParams,
startValues,
mcmcParams)
{
numReps <- mcmcParams$run$numReps
thin <- mcmcParams$run$thin
burninPerc <- mcmcParams$run$burninPerc
nStore <- numReps/thin * (1 - burninPerc)
if((numReps / thin... |
## These are a pair of functions that either calculate the inverse of a matrix or return a cached value in the case the inverse was already calculated
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL ##m is a free variable
se... | /cachematrix.R | no_license | ejennywhiley/ProgrammingAssignment2 | R | false | false | 1,200 | r | ## These are a pair of functions that either calculate the inverse of a matrix or return a cached value in the case the inverse was already calculated
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL ##m is a free variable
se... |
library(phonTools)
### Name: normalize
### Title: Normalize Vowels
### Aliases: normalize
### ** Examples
## normalize all Peterson & Barney (1952) vowels using each method.
data (pb52)
neareyE = normalize (pb52[,7:9], pb52$speaker, pb52$vowel,
method = 'neareyE')
neareyI = normalize (pb52[,7:9], pb52$speaker, pb5... | /data/genthat_extracted_code/phonTools/examples/normalize.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,125 | r | library(phonTools)
### Name: normalize
### Title: Normalize Vowels
### Aliases: normalize
### ** Examples
## normalize all Peterson & Barney (1952) vowels using each method.
data (pb52)
neareyE = normalize (pb52[,7:9], pb52$speaker, pb52$vowel,
method = 'neareyE')
neareyI = normalize (pb52[,7:9], pb52$speaker, pb5... |
# Here's the VIF code.
# select covariates based on variance inflation
# df is the data.frame of covariates you want to deflate. Each row is a cell in your raster, each column is a covariate.
# thresh is the threshold value for inflation. Any variable with a value above thresh will be excluded.
# If variable A is e... | /R scripts/vif_Sean.R | no_license | seanevans7/MSc | R | false | false | 4,573 | r | # Here's the VIF code.
# select covariates based on variance inflation
# df is the data.frame of covariates you want to deflate. Each row is a cell in your raster, each column is a covariate.
# thresh is the threshold value for inflation. Any variable with a value above thresh will be excluded.
# If variable A is e... |
library(graphframes)
### Name: gf_chain
### Title: Chain graph
### Aliases: gf_chain
### ** Examples
## Not run:
##D gf_chain(sc, 5)
## End(Not run)
| /data/genthat_extracted_code/graphframes/examples/gf_chain.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 157 | r | library(graphframes)
### Name: gf_chain
### Title: Chain graph
### Aliases: gf_chain
### ** Examples
## Not run:
##D gf_chain(sc, 5)
## End(Not run)
|
\name{taperoff}
\alias{taperoff}
\title{
Taper Functions
}
\description{
Computes a function that tapers smoothly from 0 to 1.
}
\usage{
taperoff(x, zeropoint = 0, onepoint = 1,
type = c("smooth", "cosine", "Gaussian"))
}
\arguments{
\item{x}{
Function argument. A number or a numeric vector.
}
\i... | /man/taperoff.Rd | no_license | spatstat/spatstat.utils | R | false | false | 1,889 | rd | \name{taperoff}
\alias{taperoff}
\title{
Taper Functions
}
\description{
Computes a function that tapers smoothly from 0 to 1.
}
\usage{
taperoff(x, zeropoint = 0, onepoint = 1,
type = c("smooth", "cosine", "Gaussian"))
}
\arguments{
\item{x}{
Function argument. A number or a numeric vector.
}
\i... |
code_panel <- function() {
wellPanel(
fluidRow(
column(2, selectInput("file_sel", "Optimized files:", list(),
size = 15,
multiple = FALSE, selectize = FALSE
)),
column(10, diffr::diffrOutput("code_diff"))
)
)
}
| /inst/shiny/pkg_optimizer/code_panel/cp_ui.R | no_license | jcrodriguez1989/rco | R | false | false | 257 | r | code_panel <- function() {
wellPanel(
fluidRow(
column(2, selectInput("file_sel", "Optimized files:", list(),
size = 15,
multiple = FALSE, selectize = FALSE
)),
column(10, diffr::diffrOutput("code_diff"))
)
)
}
|
#' weight the feature frequencies in a dfm
#'
#' Returns a document by feature matrix with the feature frequencies weighted
#' according to one of several common methods. Some shortcut functions that offer finer-grained control are:
#' \itemize{
#' \item{\code{\link{tf}}}{ compute term frequency weights}
#' \item{... | /R/dfm_weight.R | no_license | thrinu/quanteda | R | false | false | 18,085 | r |
#' weight the feature frequencies in a dfm
#'
#' Returns a document by feature matrix with the feature frequencies weighted
#' according to one of several common methods. Some shortcut functions that offer finer-grained control are:
#' \itemize{
#' \item{\code{\link{tf}}}{ compute term frequency weights}
#' \item{... |
library(mgarch)
OMEGA <- rbind(c(-2, 1, 1),
c(1, -1, 2),
c(3, 0, 1))
a <- c(0.1, 0.2, 0.05)
b <- c(0.8, 0.6, 0.9)
n <- 10^6
SIGMA <- OMEGA %*% t(OMEGA)
factor_process <- gogarch.make_factor_process_sample(a, b, n)
R <- OMEGA %*% factor_process$X
SIGMA_est <- gogarch.find_SIGMA_estim... | /test_2.R | no_license | solavrov/mgarch | R | false | false | 1,607 | r | library(mgarch)
OMEGA <- rbind(c(-2, 1, 1),
c(1, -1, 2),
c(3, 0, 1))
a <- c(0.1, 0.2, 0.05)
b <- c(0.8, 0.6, 0.9)
n <- 10^6
SIGMA <- OMEGA %*% t(OMEGA)
factor_process <- gogarch.make_factor_process_sample(a, b, n)
R <- OMEGA %*% factor_process$X
SIGMA_est <- gogarch.find_SIGMA_estim... |
library(tidyverse)
source('Rscripts/lib.R')
ev <- read_tsv("/gd/bayesian_RT/Alignments/SQC_20180724_3/ev_updated.txt")
ev_n <- read_tsv("/gd/bayesian_RT/Alignments/SQC_20180724_2/ev_updated.txt")
ev.f <- ev %>%
filter(!is.na(pep_new))
ev_n.f <- ev_n %>%
filter(!is.na(pep_new))
res <- abs(ev.f$`Retention time` -... | /Rscripts/norm_v_laplace.R | permissive | SlavovLab/DART-ID_2018 | R | false | false | 466 | r | library(tidyverse)
source('Rscripts/lib.R')
ev <- read_tsv("/gd/bayesian_RT/Alignments/SQC_20180724_3/ev_updated.txt")
ev_n <- read_tsv("/gd/bayesian_RT/Alignments/SQC_20180724_2/ev_updated.txt")
ev.f <- ev %>%
filter(!is.na(pep_new))
ev_n.f <- ev_n %>%
filter(!is.na(pep_new))
res <- abs(ev.f$`Retention time` -... |
matrix(1:12,ncol = 3,byrow = TRUE)
mym=matrix(1:15,ncol = 3,byrow = FALSE)
mym
mym[,1]
mym[1:3,2:3]
colSums(mym)
rowSums(mym)
rowMeans(mym)
colMeans(mym)
marks=rnorm(60,mean = 60,sd=10)
marks
matrix(marks,ncol = 6,byrow = FALSE)
mya=array(1:24,dim = c(4,3,2))
myb=array(1:24,dim = c(2,3,4))
mya
myb
apply(mya,1,sum)
#dat... | /matrix1.R | no_license | shashwatapal1297/analyticsnew | R | false | false | 1,559 | r | matrix(1:12,ncol = 3,byrow = TRUE)
mym=matrix(1:15,ncol = 3,byrow = FALSE)
mym
mym[,1]
mym[1:3,2:3]
colSums(mym)
rowSums(mym)
rowMeans(mym)
colMeans(mym)
marks=rnorm(60,mean = 60,sd=10)
marks
matrix(marks,ncol = 6,byrow = FALSE)
mya=array(1:24,dim = c(4,3,2))
myb=array(1:24,dim = c(2,3,4))
mya
myb
apply(mya,1,sum)
#dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ISOScopedName.R
\docType{class}
\name{ISOScopedName}
\alias{ISOScopedName}
\title{ISOScopedName}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} for modelling an ISO ScopedName
}
\description{
ISO... | /man/ISOScopedName.Rd | no_license | cran/geometa | R | false | true | 9,270 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ISOScopedName.R
\docType{class}
\name{ISOScopedName}
\alias{ISOScopedName}
\title{ISOScopedName}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} for modelling an ISO ScopedName
}
\description{
ISO... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/igraph_functions.R
\name{subset_graph_on_dates}
\alias{subset_graph_on_dates}
\title{subset the graph based on date ranges}
\usage{
subset_graph_on_dates(g, start_date, end_date, edge_date_var = "rel_date")
}
\description{
subset the ... | /man/subset_graph_on_dates.Rd | no_license | zbeaver4/beavR | R | false | false | 350 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/igraph_functions.R
\name{subset_graph_on_dates}
\alias{subset_graph_on_dates}
\title{subset the graph based on date ranges}
\usage{
subset_graph_on_dates(g, start_date, end_date, edge_date_var = "rel_date")
}
\description{
subset the ... |
# implementing Newton Rhapson algorithm with ordered probit model
# simulate data
N <- 100
T <- 200
beta <- c(1,-1,-0.4)
x <- array(rnorm(N*T*3,0,1),dim = c(N,T,3))
a <- rnorm(N,0,1)
meanx_i <- rowMeans(x[,,1])
alpha <- sqrt(T)*meanx_i + a
w <- matrix(alpha,nrow=N,ncol=T,byrow=FALSE) + beta[1]*x[,,1] + beta[2]*x[,,2]... | /R/code/Greene3.R | no_license | annedh93/MasterThesis | R | false | false | 6,175 | r | # implementing Newton Rhapson algorithm with ordered probit model
# simulate data
N <- 100
T <- 200
beta <- c(1,-1,-0.4)
x <- array(rnorm(N*T*3,0,1),dim = c(N,T,3))
a <- rnorm(N,0,1)
meanx_i <- rowMeans(x[,,1])
alpha <- sqrt(T)*meanx_i + a
w <- matrix(alpha,nrow=N,ncol=T,byrow=FALSE) + beta[1]*x[,,1] + beta[2]*x[,,2]... |
## first set of figures - timing of infection and sample collection
sym_onset <- read.csv ("Processed_data/sym_onset.csv", colClasses=c("Household" = "character"))
sym_onset$VOC <- factor(sym_onset$VOC , levels=c("Non-VOC", "Alpha","Gamma", "Delta", "Lambda", "Omicron"))
# time from index symptom onset to collectio... | /Scripts/infection_timeline_figures.R | no_license | lauringlab/SARS-CoV-2_VOC_transmission_bottleneck | R | false | false | 8,456 | r | ## first set of figures - timing of infection and sample collection
sym_onset <- read.csv ("Processed_data/sym_onset.csv", colClasses=c("Household" = "character"))
sym_onset$VOC <- factor(sym_onset$VOC , levels=c("Non-VOC", "Alpha","Gamma", "Delta", "Lambda", "Omicron"))
# time from index symptom onset to collectio... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_data.R
\docType{data}
\name{weather}
\alias{weather}
\title{weather}
\format{A 8723 x 16 dataframe listing the weather data for Houston for
the year 2011.}
\source{
I got this from Hadley Wickam's *Data Manipulation with dplyr*
presenta... | /man/weather.Rd | no_license | G-Thomson/IntermediateR | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_data.R
\docType{data}
\name{weather}
\alias{weather}
\title{weather}
\format{A 8723 x 16 dataframe listing the weather data for Houston for
the year 2011.}
\source{
I got this from Hadley Wickam's *Data Manipulation with dplyr*
presenta... |
#8/23/2017
#6/08/2018
#Vole Pedigree
library(kinship2)
setwd("~/Documents/Vole Pedigree/")
vole <- read.csv("R_vole_pedigree_20180705.csv")
vole1 <- vole[!duplicated(vole$Animal),]
vole1$sex <- (ifelse(vole1$Gender=="male", 1, 2))
#write.csv(vole1, file="R_vole_pedigree_20180705.csv", quote=FALSE)
#vole1 <- read.c... | /Vole Pedigree/Vole pedigree.R | no_license | dcossyleon/Vole_Project | R | false | false | 2,546 | r | #8/23/2017
#6/08/2018
#Vole Pedigree
library(kinship2)
setwd("~/Documents/Vole Pedigree/")
vole <- read.csv("R_vole_pedigree_20180705.csv")
vole1 <- vole[!duplicated(vole$Animal),]
vole1$sex <- (ifelse(vole1$Gender=="male", 1, 2))
#write.csv(vole1, file="R_vole_pedigree_20180705.csv", quote=FALSE)
#vole1 <- read.c... |
library(parallel)
library(doParallel)
library(foreach)
library(sp)
library(maptools)
library(rgeos)
library(mnormt)
source("psofun.R")
source("krigingfun.R")
load("datlist.Rdata")
datlist$sppoly <- SpatialPolygons(list(b=Polygons(list(a=datlist$poly), "a")))
ncores <- detectCores() - 4
registerDoParallel(ncores)
nswa... | /code/kriging/chrispsoruns.R | no_license | simpsonm/psodesign | R | false | false | 4,352 | r | library(parallel)
library(doParallel)
library(foreach)
library(sp)
library(maptools)
library(rgeos)
library(mnormt)
source("psofun.R")
source("krigingfun.R")
load("datlist.Rdata")
datlist$sppoly <- SpatialPolygons(list(b=Polygons(list(a=datlist$poly), "a")))
ncores <- detectCores() - 4
registerDoParallel(ncores)
nswa... |
# An R function to summarize all individual area files calculated for each taxon in step 008.sizeDR
#
# "Adapting crops to climate change: collecting, protecting and preparing crop wild relatives"
# www.cwrdiversity.org
#
# J. Ramirez - 2013
summarizeDR <- function(bdir) {
ddir <- paste(bdir, "/samples_c... | /gap-analysis/gap-code/008.summarizeDR.R | no_license | CIAT-DAPA/cwr_gap-analysis-cwr | R | false | false | 1,374 | r | # An R function to summarize all individual area files calculated for each taxon in step 008.sizeDR
#
# "Adapting crops to climate change: collecting, protecting and preparing crop wild relatives"
# www.cwrdiversity.org
#
# J. Ramirez - 2013
summarizeDR <- function(bdir) {
ddir <- paste(bdir, "/samples_c... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/explore_map.R
\name{explore_map}
\alias{explore_map}
\title{Explore powstreams site metadata on a map}
\usage{
explore_map(browse = TRUE)
}
\arguments{
\item{browse}{use browser for map rendering}
}
\description{
Open an interactive m... | /man/explore_map.Rd | permissive | lindsayplatt/powstreams | R | false | false | 340 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/explore_map.R
\name{explore_map}
\alias{explore_map}
\title{Explore powstreams site metadata on a map}
\usage{
explore_map(browse = TRUE)
}
\arguments{
\item{browse}{use browser for map rendering}
}
\description{
Open an interactive m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimulateData.R
\name{SimulateData}
\alias{SimulateData}
\title{Simulate Data}
\usage{
SimulateData(n, censoring.rate, TwoSample = F)
}
\arguments{
\item{n}{Desired sample size}
\item{censoring.rate}{Desired censoring rate, either 0.2 or 0.5}... | /man/SimulateData.Rd | no_license | nillen0/SurvBART | R | false | true | 622 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimulateData.R
\name{SimulateData}
\alias{SimulateData}
\title{Simulate Data}
\usage{
SimulateData(n, censoring.rate, TwoSample = F)
}
\arguments{
\item{n}{Desired sample size}
\item{censoring.rate}{Desired censoring rate, either 0.2 or 0.5}... |
# ----------------------------------------------
# Audrey Batzel
#
# 3/16/18
# COD PNLP data for 2014-2016
# 6/15/18
# Modified for COD PNLP data 2010-2017
# THE FOLLOWING R SCRIPT WAS RUN ON THE CLUSTER AT IHME
# ----------------------------------------------
# --------------------
# Set up R / in... | /outcome_measurement/malaria/cod/run_amelia_fullData_noPriors.R | no_license | ihmeuw/gf | R | false | false | 6,883 | r | # ----------------------------------------------
# Audrey Batzel
#
# 3/16/18
# COD PNLP data for 2014-2016
# 6/15/18
# Modified for COD PNLP data 2010-2017
# THE FOLLOWING R SCRIPT WAS RUN ON THE CLUSTER AT IHME
# ----------------------------------------------
# --------------------
# Set up R / in... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_covariates.R
\name{format_covariates}
\alias{format_covariates}
\title{FUNCTION_TITLE}
\usage{
format_covariates(covariates = covariates)
}
\arguments{
\item{covariates}{PARAM_DESCRIPTION, Default: covariates}
}
\value{
OUTPUT_DESCRIPT... | /mbg/mbg_core_code/mbg_central/LBDCore/man/format_covariates.Rd | no_license | The-Oxford-GBD-group/typhi_paratyphi_modelling_code | R | false | true | 444 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_covariates.R
\name{format_covariates}
\alias{format_covariates}
\title{FUNCTION_TITLE}
\usage{
format_covariates(covariates = covariates)
}
\arguments{
\item{covariates}{PARAM_DESCRIPTION, Default: covariates}
}
\value{
OUTPUT_DESCRIPT... |
SeqimputeEM <- function(data, max.ncomps = 5, max.ssq = 0.99, Init = "mean",
adjmean = FALSE, max.iters = 200, tol = .Machine$double.eps^0.25) {
dat.import <- data
if((nrow(na.omit(dat.import)) == nrow(dat.import))) {
stop("No Missing Values Detected")
} else {
dat.import
}
... | /R/SeqimputeEM.R | no_license | cwmiller21/mvdalab | R | false | false | 1,945 | r | SeqimputeEM <- function(data, max.ncomps = 5, max.ssq = 0.99, Init = "mean",
adjmean = FALSE, max.iters = 200, tol = .Machine$double.eps^0.25) {
dat.import <- data
if((nrow(na.omit(dat.import)) == nrow(dat.import))) {
stop("No Missing Values Detected")
} else {
dat.import
}
... |
# compare 1kg v topmed emmax association test
library(here)
library(readr)
library(dplyr)
library(magrittr)
library(ggplot2)
library(rtracklayer)
library(liftOver)
library(Gviz)
library(GenomicRanges)
library(GenomicAlignments)
library(DESeq2)
library(biomaRt)
library(mikelaffr)
# OUTPUT FILES #######################... | /doc/emmax/emmax_1kg_v_topmed.R | no_license | mikelaff/mirna-eqtl-manuscript | R | false | false | 10,611 | r | # compare 1kg v topmed emmax association test
library(here)
library(readr)
library(dplyr)
library(magrittr)
library(ggplot2)
library(rtracklayer)
library(liftOver)
library(Gviz)
library(GenomicRanges)
library(GenomicAlignments)
library(DESeq2)
library(biomaRt)
library(mikelaffr)
# OUTPUT FILES #######################... |
library("data.table")
powerDT <- data.table::fread(input = "household_power_consumption.txt", na.strings="?")
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
powerDT[, dateTime := as.POSIXct(paste(Date, Time), format = "%d/%m/%Y %H:%M:%S")]
powerDT <- powerDT[(dateTime >= "... | /plot4.R | no_license | kad-kun/exploratory-data-analysis | R | false | false | 1,145 | r | library("data.table")
powerDT <- data.table::fread(input = "household_power_consumption.txt", na.strings="?")
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
powerDT[, dateTime := as.POSIXct(paste(Date, Time), format = "%d/%m/%Y %H:%M:%S")]
powerDT <- powerDT[(dateTime >= "... |
library(EcoSimR)
### Name: null_model_engine
### Title: Run null model
### Aliases: null_model_engine
### ** Examples
## Not run:
##D # User defined function
##D
##D
## End(Not run)
| /data/genthat_extracted_code/EcoSimR/examples/null_model_engine.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 192 | r | library(EcoSimR)
### Name: null_model_engine
### Title: Run null model
### Aliases: null_model_engine
### ** Examples
## Not run:
##D # User defined function
##D
##D
## End(Not run)
|
library(ggplot2)
library(reshape)
library(corrplot)
library(forecast)
filename <- "../data/data_waterlevel_final_clear"
#format date and datetime
data_air <- read.csv(filename, header = TRUE)
data_air$Tanggal <- as.Date(as.character(data_air$Tanggal), "%d/%m/%Y")
data_air$datetime <- paste(data_air$Tangga... | /Rscript/waterlevel_analysis.R | no_license | ajayws/JSC | R | false | false | 3,869 | r | library(ggplot2)
library(reshape)
library(corrplot)
library(forecast)
filename <- "../data/data_waterlevel_final_clear"
#format date and datetime
data_air <- read.csv(filename, header = TRUE)
data_air$Tanggal <- as.Date(as.character(data_air$Tanggal), "%d/%m/%Y")
data_air$datetime <- paste(data_air$Tangga... |
# Made by: Hugo Swenson, 2019-01-25
get_myord <- function(cycle_start, ordIndex)
{
# Obtains the real time-series
myord = c(cycle_start:length(ordIndex), 1:cycle_start)
myord <- head(myord, -1)
return(myord)
} | /r_scripts/hugo/reCAT_master/R/get_myord.r | no_license | linneaferiksson/scrna-cell-cycle | R | false | false | 223 | r | # Made by: Hugo Swenson, 2019-01-25
get_myord <- function(cycle_start, ordIndex)
{
# Obtains the real time-series
myord = c(cycle_start:length(ordIndex), 1:cycle_start)
myord <- head(myord, -1)
return(myord)
} |
#' @inheritParams stat_identity
#' @section Computed variables:
#' \describe{
#' \item{n}{number of observations at position}
#' \item{prop}{percent of points in that panel at that position}
#' }
#' @export
#' @rdname geom_count
stat_sum <- function(mapping = NULL, data = NULL, geom = "point",
po... | /R/stat-sum.r | no_license | jiho/ggplot2 | R | false | false | 1,219 | r | #' @inheritParams stat_identity
#' @section Computed variables:
#' \describe{
#' \item{n}{number of observations at position}
#' \item{prop}{percent of points in that panel at that position}
#' }
#' @export
#' @rdname geom_count
stat_sum <- function(mapping = NULL, data = NULL, geom = "point",
po... |
#' Capitalize Every Word of String
#'
#' Capitalizes every word of a string.
#'
#' @param text A character vector or text copied to the clipboard. Default is to
#' read from the clipboard.
#' @param copy2clip logical. If \code{TRUE} attempts to copy the output to the
#' clipboard.
#' @details This capitalizes ev... | /R/CA.R | no_license | 2ndFloorStuff/reports | R | false | false | 954 | r | #' Capitalize Every Word of String
#'
#' Capitalizes every word of a string.
#'
#' @param text A character vector or text copied to the clipboard. Default is to
#' read from the clipboard.
#' @param copy2clip logical. If \code{TRUE} attempts to copy the output to the
#' clipboard.
#' @details This capitalizes ev... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importGeneSets.R
\name{importGeneSetsFromMSigDB}
\alias{importGeneSetsFromMSigDB}
\title{Imports gene sets from MSigDB}
\usage{
importGeneSetsFromMSigDB(
inSCE,
categoryIDs,
species = "Homo sapiens",
mapping = c("gene_symbol", "human_... | /man/importGeneSetsFromMSigDB.Rd | permissive | ykoga07/singleCellTK | R | false | true | 2,957 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importGeneSets.R
\name{importGeneSetsFromMSigDB}
\alias{importGeneSetsFromMSigDB}
\title{Imports gene sets from MSigDB}
\usage{
importGeneSetsFromMSigDB(
inSCE,
categoryIDs,
species = "Homo sapiens",
mapping = c("gene_symbol", "human_... |
# app.R
library(shiny)
library(shinydashboard)
library(ggplot2)
# these operations need to be done only once
# read the data set
popdata = read.csv("../module2-pop/pop_proj.csv") # data set is in the same folder as the app.
# we need these lists to automatically populate the choices in the UI.
sex_list <- c("All",... | /Day1/module2/answers/module2-pop2/app.R | no_license | AngelSci/psds3300 | R | false | false | 2,435 | r | # app.R
library(shiny)
library(shinydashboard)
library(ggplot2)
# these operations need to be done only once
# read the data set
popdata = read.csv("../module2-pop/pop_proj.csv") # data set is in the same folder as the app.
# we need these lists to automatically populate the choices in the UI.
sex_list <- c("All",... |
\name{manhattan}
\alias{manhattan}
\title{Manhattan plots for P-values}
\description{
Plots a \sQuote{Manhattan} plot, appropriate for P-values from a
genome-wide analysis.
}
\usage{
manhattan(p, SNP, chr, pos, ...)
}
\arguments{
\item{p}{A vector of P-values}
\item{SNP}{A vector of SNP names in chr:pos[:allele... | /man/manhattan.Rd | no_license | chuangaocornell/gtx2 | R | false | false | 1,128 | rd | \name{manhattan}
\alias{manhattan}
\title{Manhattan plots for P-values}
\description{
Plots a \sQuote{Manhattan} plot, appropriate for P-values from a
genome-wide analysis.
}
\usage{
manhattan(p, SNP, chr, pos, ...)
}
\arguments{
\item{p}{A vector of P-values}
\item{SNP}{A vector of SNP names in chr:pos[:allele... |
library(pracma)
### Name: lambertWp
### Title: Lambert's W Function
### Aliases: lambertWp lambertWn
### Keywords: specfun
### ** Examples
## Examples
lambertWp(0) #=> 0
lambertWp(1) #=> 0.5671432904097838... Omega constant
lambertWp(exp(1)) #=> 1
lambertWp(-log(2)/2) #=> -log(2)
# The sol... | /data/genthat_extracted_code/pracma/examples/lambertW.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,444 | r | library(pracma)
### Name: lambertWp
### Title: Lambert's W Function
### Aliases: lambertWp lambertWn
### Keywords: specfun
### ** Examples
## Examples
lambertWp(0) #=> 0
lambertWp(1) #=> 0.5671432904097838... Omega constant
lambertWp(exp(1)) #=> 1
lambertWp(-log(2)/2) #=> -log(2)
# The sol... |
##MakeCacheMatrix returns list of functions
##This function has four functions with purpose defined below
##________________________________
## Function Purpose
##________________________________
## setM Sets value of the matrix
## getM Gets value of the matrix
## cacheInv Gets ... | /cachematrix.R | no_license | vemukamesh/ProgrammingAssignment2 | R | false | false | 1,761 | r | ##MakeCacheMatrix returns list of functions
##This function has four functions with purpose defined below
##________________________________
## Function Purpose
##________________________________
## setM Sets value of the matrix
## getM Gets value of the matrix
## cacheInv Gets ... |
library(tidyverse)
library(cowplot)
month_level_pwt_vocab <- read_csv("data/month_level_pwt_vocab_ransubj.csv")
subj_level_pwt_obsrep_mo <- read_csv("data/subjlevel_pwt_obsrep_mo_ransubj.csv")
gathervocab_month_level_pwt <- read_csv("data/gathervocab_month_level_pwt_ransubj.csv")
# obs vs. rep dist first walk --... | /pwt_graphs.R | no_license | BergelsonLab/PointWalkTalkPublic | R | false | false | 28,860 | r | library(tidyverse)
library(cowplot)
month_level_pwt_vocab <- read_csv("data/month_level_pwt_vocab_ransubj.csv")
subj_level_pwt_obsrep_mo <- read_csv("data/subjlevel_pwt_obsrep_mo_ransubj.csv")
gathervocab_month_level_pwt <- read_csv("data/gathervocab_month_level_pwt_ransubj.csv")
# obs vs. rep dist first walk --... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yingtools2.R
\name{geom_bracket}
\alias{geom_bracket}
\title{Draw Brackets}
\usage{
geom_bracket(
mapping = NULL,
data = NULL,
stat = StatBracket,
position = "identity",
...,
na.rm = FALSE,
bracket.width = unit(0.75, "char"),
... | /man/geom_bracket.Rd | no_license | ying14/yingtools2 | R | false | true | 6,269 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yingtools2.R
\name{geom_bracket}
\alias{geom_bracket}
\title{Draw Brackets}
\usage{
geom_bracket(
mapping = NULL,
data = NULL,
stat = StatBracket,
position = "identity",
...,
na.rm = FALSE,
bracket.width = unit(0.75, "char"),
... |
# Logit-transformed DV models
form.h3.dom.barriers.total <- prop.ngo.dom_logit_next_year ~
barriers.total_within + barriers.total_between +
polity_within + polity_between +
gdp.capita_log_within + gdp.capita_log_between +
trade.pct.gdp_within + trade.pct.gdp_between +
corruption_within + corruption_between +... | /lib/h3_model_definitions_bayes.R | permissive | larsvilhuber/donors-ngo-restrictions | R | false | false | 13,898 | r | # Logit-transformed DV models
form.h3.dom.barriers.total <- prop.ngo.dom_logit_next_year ~
barriers.total_within + barriers.total_between +
polity_within + polity_between +
gdp.capita_log_within + gdp.capita_log_between +
trade.pct.gdp_within + trade.pct.gdp_between +
corruption_within + corruption_between +... |
B<-c(7685675,5003325,4928675,3617500,2724775,1914075,1381150,1161950,1099775,1023800)*10^-6
VB<-c(2882775,2773025, 1228250,1180025,1168400,966575,917125,916500,911700,837875)*10^-6
VBcrop1<-read.csv('/Users/katya/Google Drive/PhD/Hydrophobicity/SEM/ParticleSizeAnalysis/VB_1_bseCrop1.csv', header=T)
NBcrop1<-read.csv('... | /Code/SEManalysis.R | no_license | erakhmatulina/Post-fire-hydrophobicity | R | false | false | 17,568 | r | B<-c(7685675,5003325,4928675,3617500,2724775,1914075,1381150,1161950,1099775,1023800)*10^-6
VB<-c(2882775,2773025, 1228250,1180025,1168400,966575,917125,916500,911700,837875)*10^-6
VBcrop1<-read.csv('/Users/katya/Google Drive/PhD/Hydrophobicity/SEM/ParticleSizeAnalysis/VB_1_bseCrop1.csv', header=T)
NBcrop1<-read.csv('... |
############
###Plot 3###
############
data <- read.csv2('household_power_consumption.txt', header=T, sep=';', nrows=2075259, na.strings='?')
dim(data)
#[1] 2075259 9
#We will only be using data from the dates 2007-02-01 and 2007-02-02. One alternative is to read the data from just those dates rather than readin... | /plot3.R | no_license | basculethirascule/ExData_Plotting1 | R | false | false | 1,239 | r | ############
###Plot 3###
############
data <- read.csv2('household_power_consumption.txt', header=T, sep=';', nrows=2075259, na.strings='?')
dim(data)
#[1] 2075259 9
#We will only be using data from the dates 2007-02-01 and 2007-02-02. One alternative is to read the data from just those dates rather than readin... |
CPP_FEM.DE <- function(data, FEMbasis, lambda, fvec, heatStep, heatIter, ndim, mydim, step_method, direction_method, preprocess_method,
stepProposals, tol1, tol2, print, nfolds, nsimulations)
{
# Indexes in C++ starts from 0, in R from 1, opportune transformation
FEMbasis$mesh$triangles = ... | /R/DE_CPP.R | no_license | clarapigolotti/PACSGhilottiPigolotti | R | false | false | 6,624 | r | CPP_FEM.DE <- function(data, FEMbasis, lambda, fvec, heatStep, heatIter, ndim, mydim, step_method, direction_method, preprocess_method,
stepProposals, tol1, tol2, print, nfolds, nsimulations)
{
# Indexes in C++ starts from 0, in R from 1, opportune transformation
FEMbasis$mesh$triangles = ... |
# Credit to Sebastian Sauer's blog for this function
# https://sebastiansauer.github.io/convert_logit2prob/
logit2prob <- function(logit){
odds <- exp(logit)
prob <- odds / (1 + odds)
return(prob)
}
# Function that reverses logit2prob
prob2logit <- function(prob) {
odds <- prob / (1 - prob)
logit <- log(odds... | /api.R | no_license | Brendan-Schuetze/logRegAPI | R | false | false | 1,303 | r | # Credit to Sebastian Sauer's blog for this function
# https://sebastiansauer.github.io/convert_logit2prob/
logit2prob <- function(logit){
odds <- exp(logit)
prob <- odds / (1 + odds)
return(prob)
}
# Function that reverses logit2prob
prob2logit <- function(prob) {
odds <- prob / (1 - prob)
logit <- log(odds... |
library(testthat)
# ---- install_packages_addin --------------------------------------------------------------
test_that("install_packages_addin", {
testthat::skip("This function is too invasive to run on other people's machines.")
install_packages_addin()
testthat::expect_true(TRUE)
})
| /tests/testthat/test-install-packages-addin.R | permissive | OuhscBbmc/OuhscMunge | R | false | false | 295 | r | library(testthat)
# ---- install_packages_addin --------------------------------------------------------------
test_that("install_packages_addin", {
testthat::skip("This function is too invasive to run on other people's machines.")
install_packages_addin()
testthat::expect_true(TRUE)
})
|
# Impute spending data for all HRS observations using a model with age-of-retirement and age-of-retirement^2 instead of dummy variables
# cams <- read.csv('~/Dropbox/Robo Research/Retirement-Selected CAMS data.csv')
cams <- read.csv('~/Dropbox/Robo Research/CAMS data.csv')
cams <- cams[cams$selectedBy != "notR... | /Impute Missing Spending Data WOR and WOR Squared.R | no_license | DirkCotton/HRS | R | false | false | 14,938 | r | # Impute spending data for all HRS observations using a model with age-of-retirement and age-of-retirement^2 instead of dummy variables
# cams <- read.csv('~/Dropbox/Robo Research/Retirement-Selected CAMS data.csv')
cams <- read.csv('~/Dropbox/Robo Research/CAMS data.csv')
cams <- cams[cams$selectedBy != "notR... |
# filler
fill_data_ <- function(val, col){
un_val <- as.character(unique(val))
colors <- colorRampPalette(col)(length(un_val))
table_col <- data.frame(colors = colors, values = un_val)
assign("colors", table_col, envir = data_env)
# default
data <- sapply(colors, as.list)
names(data) <- un_val
return... | /R/utils.R | no_license | jimsforks/datamaps | R | false | false | 3,926 | r | # filler
fill_data_ <- function(val, col){
un_val <- as.character(unique(val))
colors <- colorRampPalette(col)(length(un_val))
table_col <- data.frame(colors = colors, values = un_val)
assign("colors", table_col, envir = data_env)
# default
data <- sapply(colors, as.list)
names(data) <- un_val
return... |
library(Devore7)
### Name: ex06.05
### Title: R Data set: ex06.05
### Aliases: ex06.05
### Keywords: datasets
### ** Examples
data(ex06.05)
str(ex06.05)
| /data/genthat_extracted_code/Devore7/examples/ex06.05.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 160 | r | library(Devore7)
### Name: ex06.05
### Title: R Data set: ex06.05
### Aliases: ex06.05
### Keywords: datasets
### ** Examples
data(ex06.05)
str(ex06.05)
|
# upload file
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip', 'household_power_consumption.zip')
unzip('household_power_consumption.zip')
# load and filter data
data <- read.csv('household_power_consumption.txt',na.strings='?',sep=';',stringsAsFactors=FALSE)
febru... | /plot2.R | no_license | snsanich/ExData_Plotting1 | R | false | false | 731 | r | # upload file
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip', 'household_power_consumption.zip')
unzip('household_power_consumption.zip')
# load and filter data
data <- read.csv('household_power_consumption.txt',na.strings='?',sep=';',stringsAsFactors=FALSE)
febru... |
###############################################
# 20.02.2018
# RFE for RFR with N (%) and ADF (%)
# JW
###############################################
# Loading required packages
rm(list = ls())
library(data.table)
library(dplyr)
library(hsdar)
library(ggplot2)
library(caret)
library(purrr)
library(readr)
library(pp... | /scripts/rfr_rfe.R | no_license | jmatics/fq_modelling_2018 | R | false | false | 3,972 | r | ###############################################
# 20.02.2018
# RFE for RFR with N (%) and ADF (%)
# JW
###############################################
# Loading required packages
rm(list = ls())
library(data.table)
library(dplyr)
library(hsdar)
library(ggplot2)
library(caret)
library(purrr)
library(readr)
library(pp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.