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 |
|---|---|---|---|---|---|---|---|---|---|
\name{data.sim.mfr}
\alias{data.sim.mfr}
\alias{data.sim.facets}
\docType{data}
\title{
Simulated Multifaceted Data
}
\description{
Simulated data from multiple facets.
}
%% ## DON'T FORGET TO SET SEEDS BEFORE SIMULATING ACTUAL SIM-DATA
%% ## (NOT DONE YET)
%% ## Safe simulation script in "inst"-... | /man/data.sim.mfr.Rd | no_license | ayoakinphd/TAM | R | false | false | 4,117 | rd | \name{data.sim.mfr}
\alias{data.sim.mfr}
\alias{data.sim.facets}
\docType{data}
\title{
Simulated Multifaceted Data
}
\description{
Simulated data from multiple facets.
}
%% ## DON'T FORGET TO SET SEEDS BEFORE SIMULATING ACTUAL SIM-DATA
%% ## (NOT DONE YET)
%% ## Safe simulation script in "inst"-... |
#Load libraries
library(dplyr)
library(magrittr)
library(brms)
##Read in data
# Dataset
data_DA <- read.csv("data/growth/processed/analysis/Ldeli_quangen_growth_DA.csv", stringsAsFactors = F)
str(data_DA)
dim(data_DA)
#Format date and treatment
data_DA %<>% mutate(treatment = as.factor(treatment),
... | /Katana/brms_mod.12.DA_het_fixed2.R | no_license | fontikar/ldeli_growth | R | false | false | 1,383 | r | #Load libraries
library(dplyr)
library(magrittr)
library(brms)
##Read in data
# Dataset
data_DA <- read.csv("data/growth/processed/analysis/Ldeli_quangen_growth_DA.csv", stringsAsFactors = F)
str(data_DA)
dim(data_DA)
#Format date and treatment
data_DA %<>% mutate(treatment = as.factor(treatment),
... |
context("Test color console lists")
test_that("basic print", {
litems <- list(
"Sets key using surgID, procDate, and argument cohortVars",
"Executes funs ApplySurgFilter, ApplyCohortFilter, IndexCohortCases",
"Funs above are applied successively on the dataset",
"Summarize cohort experience profile b... | /tests/testthat/test-basic.R | no_license | bfatemi/consolenotes | R | false | false | 938 | r | context("Test color console lists")
test_that("basic print", {
litems <- list(
"Sets key using surgID, procDate, and argument cohortVars",
"Executes funs ApplySurgFilter, ApplyCohortFilter, IndexCohortCases",
"Funs above are applied successively on the dataset",
"Summarize cohort experience profile b... |
##################################################################################
###### Table A.9: First stage regression of destruction on barrack distance ######
##################################################################################
rm(list=ls())
# load required libraries
library(readstata13)
library(... | /Original Paper and Code/Original Code/TableA9.R | no_license | CianStryker/Prosocial_Behavior | R | false | false | 1,268 | r | ##################################################################################
###### Table A.9: First stage regression of destruction on barrack distance ######
##################################################################################
rm(list=ls())
# load required libraries
library(readstata13)
library(... |
#' @title Cohen's Kappa
#' @description Bayesian alternative to Cohen's kappa
#' @param x predictor variable(s), Default: NULL
#' @param x.names optional names for predictor variable(s), Default: NULL
#' @param DF data to analyze
#' @param params define parameters to observe, Default: NULL
#' @param initial.list initia... | /R/stats_kappa.R | permissive | anhnguyendepocen/bfw | R | false | false | 2,702 | r | #' @title Cohen's Kappa
#' @description Bayesian alternative to Cohen's kappa
#' @param x predictor variable(s), Default: NULL
#' @param x.names optional names for predictor variable(s), Default: NULL
#' @param DF data to analyze
#' @param params define parameters to observe, Default: NULL
#' @param initial.list initia... |
library(shiny)
library(shinyTable)
shinyUI(pageWithSidebar(
# Application title
headerPanel("Proliferation Assay Plot"),
sidebarPanel(
textInput('experiment',label = h5("Enter experiment name"), value = "Experiment"),
textInput('gene',label = h5("Enter gene name"), value = "Gene"),
numer... | /old/ui.R | permissive | matteocereda/proliferation_assay | R | false | false | 913 | r | library(shiny)
library(shinyTable)
shinyUI(pageWithSidebar(
# Application title
headerPanel("Proliferation Assay Plot"),
sidebarPanel(
textInput('experiment',label = h5("Enter experiment name"), value = "Experiment"),
textInput('gene',label = h5("Enter gene name"), value = "Gene"),
numer... |
library(ggplot2)
library(parallel)
library(phest)
library(dplyr)
nn <- 20000
#10 SD
set.seed(10)
obs_10sd <- rnorm(20000, mean = 200, sd = 10)
to_10sd <- as.data.frame(obs_10sd)
ggplot(data= to_10sd, aes(x = obs_10sd)) + geom_histogram(bins = 150)
min(to_10sd) ## 162.6818
max(to_10sd) # 199.89258
quantile(obs_10sd, p... | /scripts/summerscripts/pearse_40sd_scripts.R | no_license | mbelitz/Pollard-Incidental_Comparisons | R | false | false | 5,243 | r | library(ggplot2)
library(parallel)
library(phest)
library(dplyr)
nn <- 20000
#10 SD
set.seed(10)
obs_10sd <- rnorm(20000, mean = 200, sd = 10)
to_10sd <- as.data.frame(obs_10sd)
ggplot(data= to_10sd, aes(x = obs_10sd)) + geom_histogram(bins = 150)
min(to_10sd) ## 162.6818
max(to_10sd) # 199.89258
quantile(obs_10sd, p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orcid_fundings.R
\name{orcid_fundings}
\alias{orcid_fundings}
\title{Get funding information for a person}
\usage{
orcid_fundings(orcid, put_code = NULL, format = "application/json",
summary = FALSE, ...)
}
\arguments{
\item{orcid}{(charact... | /man/orcid_fundings.Rd | permissive | awconway/rorcid | R | false | true | 1,595 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orcid_fundings.R
\name{orcid_fundings}
\alias{orcid_fundings}
\title{Get funding information for a person}
\usage{
orcid_fundings(orcid, put_code = NULL, format = "application/json",
summary = FALSE, ...)
}
\arguments{
\item{orcid}{(charact... |
new_rng_snapshots <- utils::compareVersion("3.6.0", as.character(getRversion())) > 0
# New (as of 4.3.0) a new option generates different snapshots
rankdeficient_version <- any(names(formals("predict.lm")) == "rankdeficient")
helper_objects_tune <- function() {
rec_tune_1 <-
recipes::recipe(mpg ~ ., data = mtc... | /tests/testthat/helper-tune-package.R | permissive | tidymodels/tune | R | false | false | 872 | r | new_rng_snapshots <- utils::compareVersion("3.6.0", as.character(getRversion())) > 0
# New (as of 4.3.0) a new option generates different snapshots
rankdeficient_version <- any(names(formals("predict.lm")) == "rankdeficient")
helper_objects_tune <- function() {
rec_tune_1 <-
recipes::recipe(mpg ~ ., data = mtc... |
###############################################################################
# parametros
orden_stam = TRUE
zoom = F
unidad_par_t = 'tiempo'
#unidad_par_t = 'epocas'
usar.log = F
# tamano de la ventana analizada, nombre raro para evitar confusiones
dur.chunk = 1
archivo.excel = '/pvalores... | /articulo_dfa/scripts/graf_hurst08_win_median.R | no_license | amoneta/TESIS_JULIO | R | false | false | 22,777 | r | ###############################################################################
# parametros
orden_stam = TRUE
zoom = F
unidad_par_t = 'tiempo'
#unidad_par_t = 'epocas'
usar.log = F
# tamano de la ventana analizada, nombre raro para evitar confusiones
dur.chunk = 1
archivo.excel = '/pvalores... |
# data import and cleaning
library(rstudioapi)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #Set working director to where this document is
raw_df <- read.csv("../data/week3.csv")
raw_df$timeStart <- as.POSIXct(raw_df$timeStart)
raw_df$timeEnd <- as.POSIXct(raw_df$timeEnd)
clean_df <- raw_df[raw_d... | /Module_3/R/Module_3.R | no_license | WillEddy/Data-Science-for-Social-Scientists | R | false | false | 884 | r | # data import and cleaning
library(rstudioapi)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #Set working director to where this document is
raw_df <- read.csv("../data/week3.csv")
raw_df$timeStart <- as.POSIXct(raw_df$timeStart)
raw_df$timeEnd <- as.POSIXct(raw_df$timeEnd)
clean_df <- raw_df[raw_d... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/facet-wrap.r
\name{facet_wrap}
\alias{facet_wrap}
\title{Wrap a 1d ribbon of panels into 2d.}
\usage{
facet_wrap(facets, nrow = NULL, ncol = NULL, scales = "fixed",
shrink = TRUE, labeller = "label_value", as.table = TRUE,
switch ... | /man/facet_wrap.Rd | no_license | bbolker/ggplot2 | R | false | false | 4,087 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/facet-wrap.r
\name{facet_wrap}
\alias{facet_wrap}
\title{Wrap a 1d ribbon of panels into 2d.}
\usage{
facet_wrap(facets, nrow = NULL, ncol = NULL, scales = "fixed",
shrink = TRUE, labeller = "label_value", as.table = TRUE,
switch ... |
#' @rdname run_gibbsflow_ais
#' @title Run Gibbs flow annealed importance sampler
#' @param prior list with keys:
#' \code{logdensity} evaluates log prior density,
#' \code{gradlogdensity} returns its gradient,
#' \code{rinit} samples from the prior distribution
#' @param likelihood list with keys:
#' \code{logden... | /R/run_gibbsflow_ais.R | no_license | TorbenSell/GibbsFlow | R | false | false | 3,734 | r | #' @rdname run_gibbsflow_ais
#' @title Run Gibbs flow annealed importance sampler
#' @param prior list with keys:
#' \code{logdensity} evaluates log prior density,
#' \code{gradlogdensity} returns its gradient,
#' \code{rinit} samples from the prior distribution
#' @param likelihood list with keys:
#' \code{logden... |
### GENERIC TREE R SCRIPT ###
#rdir = "/home/re1u06/researchfiles/SBSBINF/Tools/svn/libraries/r/"
#rdir = "/home/re1u06/Tools/libraries/r/"
#rdir = "/home/redwards/Serpentry/"
#rdir = "/data/ben/Serpentry/"
rdir = "/Users/redwards/Dropbox/_Repository_/slimsuite/libraries/r/"
rjesource = function(rfile){
source(pas... | /libraries/r/rje_tree.r | no_license | NPalopoli/SLiMSuite | R | false | false | 2,731 | r | ### GENERIC TREE R SCRIPT ###
#rdir = "/home/re1u06/researchfiles/SBSBINF/Tools/svn/libraries/r/"
#rdir = "/home/re1u06/Tools/libraries/r/"
#rdir = "/home/redwards/Serpentry/"
#rdir = "/data/ben/Serpentry/"
rdir = "/Users/redwards/Dropbox/_Repository_/slimsuite/libraries/r/"
rjesource = function(rfile){
source(pas... |
library(dplyr)
# read data
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
# convert to tibble for easier manipulation
NEI <- as_tibble(NEI)
# calculate total PM2.5 emission by year
NEI_year <- NEI %>%
group_by(year) %>%
summarise(sum(Emissions,na.rm=TRUE)) %>%
print
colnames(NEI_year) <- c("year",... | /plot1.R | no_license | ttc142/coursera_eda2 | R | false | false | 662 | r | library(dplyr)
# read data
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
# convert to tibble for easier manipulation
NEI <- as_tibble(NEI)
# calculate total PM2.5 emission by year
NEI_year <- NEI %>%
group_by(year) %>%
summarise(sum(Emissions,na.rm=TRUE)) %>%
print
colnames(NEI_year) <- c("year",... |
library(dplyr)
localfile <- "./data/extdata-data-household_power_consumption.zip"
if(!file.exists(localfile)){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", dest=localfile, mode="wb")
}
unzipdir <- "./data/extdataproj"
if (list.files(unzipdir) != unzip(local... | /plot2.R | no_license | jazzfree/ExData_Plotting1 | R | false | false | 1,277 | r | library(dplyr)
localfile <- "./data/extdata-data-household_power_consumption.zip"
if(!file.exists(localfile)){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", dest=localfile, mode="wb")
}
unzipdir <- "./data/extdataproj"
if (list.files(unzipdir) != unzip(local... |
#This data is a collection of information about the number of male and female months in an area of South Wales
#There are 16 Colonies of moths and we are interested in estimating the True mean proportion of Female Moths in population
#The function of the Moths' genders is binomial where each moth is either Fema... | /R_Files/AQM/Weekly Materials/Week 4/Loglikelyhood on gender populations.r | no_license | menquist/Michael_Enquist | R | false | false | 1,537 | r |
#This data is a collection of information about the number of male and female months in an area of South Wales
#There are 16 Colonies of moths and we are interested in estimating the True mean proportion of Female Moths in population
#The function of the Moths' genders is binomial where each moth is either Fema... |
# get_total_count
get_total_count <- function(dat, departure_name, arrival_name){
data("subway_route")
data("seoul_station")
total <- data.frame(matrix(0,1,468))
colnames(total) <- seoul_station
departure <- dat[,departure_name]
arrival <- dat[,arrival_name]
time.started <- Sys.time()
cat(paste('Starte... | /R/get_total_count.R | no_license | king4k1/seoulsubway | R | false | false | 1,013 | r | # get_total_count
get_total_count <- function(dat, departure_name, arrival_name){
data("subway_route")
data("seoul_station")
total <- data.frame(matrix(0,1,468))
colnames(total) <- seoul_station
departure <- dat[,departure_name]
arrival <- dat[,arrival_name]
time.started <- Sys.time()
cat(paste('Starte... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "sonar")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("clas... | /models/openml_sonar/classification_Class/553e49e8e415d4dbeb679e29ebacf274/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 694 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "sonar")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("clas... |
\name{null.breadth}
\alias{null.breadth}
\title{
null.breadth
}
\description{
This function calculates the null expectation of host breadth if herbivores sample diet items randomly.
}
\usage{
null.breadth(dat, dist.method = "jaccard", rep = 100, quantiles = c(0.025, 0.975),
scaled = FALSE)
}
\arguments{
\item{dat}{
... | /man/null.breadth.Rd | no_license | butterflyology/ordiBreadth | R | false | false | 1,498 | rd | \name{null.breadth}
\alias{null.breadth}
\title{
null.breadth
}
\description{
This function calculates the null expectation of host breadth if herbivores sample diet items randomly.
}
\usage{
null.breadth(dat, dist.method = "jaccard", rep = 100, quantiles = c(0.025, 0.975),
scaled = FALSE)
}
\arguments{
\item{dat}{
... |
/script for PAM data and statistics of RLC parameters.R | no_license | ronenliberman/CC-disrupt-octocoral-reproductive-synchrony | R | false | false | 9,138 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_invcom_data.R
\name{get_invcom_data_list}
\alias{get_invcom_data_list}
\title{scrape Investing.com Finance data}
\usage{
get_invcom_data_list(pjs_session, ticker_tbl, start_date, end_date)
}
\arguments{
\item{pjs_session}{phantom.js sessi... | /man/get_invcom_data_list.Rd | no_license | ces0491/companyDataScrapeR | R | false | true | 655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_invcom_data.R
\name{get_invcom_data_list}
\alias{get_invcom_data_list}
\title{scrape Investing.com Finance data}
\usage{
get_invcom_data_list(pjs_session, ticker_tbl, start_date, end_date)
}
\arguments{
\item{pjs_session}{phantom.js sessi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internalHelpers.R
\name{getTimeConversionFactor}
\alias{getTimeConversionFactor}
\title{transform timeUnit to convert from seconds to specified unit}
\usage{
getTimeConversionFactor(timeUnit)
}
\description{
@param timeUnit character vector
}... | /man/getTimeConversionFactor.Rd | no_license | cran/spectralAnalysis | R | false | true | 340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internalHelpers.R
\name{getTimeConversionFactor}
\alias{getTimeConversionFactor}
\title{transform timeUnit to convert from seconds to specified unit}
\usage{
getTimeConversionFactor(timeUnit)
}
\description{
@param timeUnit character vector
}... |
#' Get radiality centrality scores
#' @description Get the radiality centrality
#' for all nodes in a graph. These scores describe
#' the ease to which nodes can reach other nodes.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param direction using \code{all} (the default), the
#' search will ignore ... | /R/get_radiality.R | permissive | wk1984/DiagrammeR | R | false | false | 3,223 | r | #' Get radiality centrality scores
#' @description Get the radiality centrality
#' for all nodes in a graph. These scores describe
#' the ease to which nodes can reach other nodes.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param direction using \code{all} (the default), the
#' search will ignore ... |
#################################################################
#################################################################
# Hazi feladat a fokomponenselemzes es faktorelemzes temaban #
#################################################################
####################################################... | /seminar_11/Homework/Homework_S11_solution.R | permissive | VamosiDaniel/PSZB17-210-Data-analysis-seminar | R | false | false | 7,637 | r | #################################################################
#################################################################
# Hazi feladat a fokomponenselemzes es faktorelemzes temaban #
#################################################################
####################################################... |
#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 {
"HistoGrid"
},
/* [3] */
Category {
"Sample Plug-ins"
},
#ifdef AE_OS_WIN
#ifdef ... | /code/Examples/UI/HistoGrid/HistoGridPiPL.r | no_license | majthehero/glitchFXdev | R | false | false | 1,043 | 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 {
"HistoGrid"
},
/* [3] */
Category {
"Sample Plug-ins"
},
#ifdef AE_OS_WIN
#ifdef ... |
#' Use Make
#'
#' Add a (GNU-)Makefile(s) with special emphasis on the use of containers.
#' @param docker If true a setup is created that can partially send make commands to a Docker container
#' @param singularity If true a setup is created that can partially send make commands to a Singularity container (which requi... | /R/make.R | permissive | annariha/repro | R | false | false | 3,313 | r | #' Use Make
#'
#' Add a (GNU-)Makefile(s) with special emphasis on the use of containers.
#' @param docker If true a setup is created that can partially send make commands to a Docker container
#' @param singularity If true a setup is created that can partially send make commands to a Singularity container (which requi... |
PLS_beta <- function(dataY,dataX,nt=2,limQ2set=.0975,dataPredictY=dataX,modele="pls",family=NULL,typeVC="none",EstimXNA=FALSE,scaleX=TRUE,scaleY=NULL,pvals.expli=FALSE,alpha.pvals.expli=.05,MClassed=FALSE,tol_Xi=10^(-12),weights,method,sparse=FALSE,sparseStop=TRUE,naive=FALSE,link=NULL,link.phi=NULL,type="ML") {
##... | /plsRbeta/R/PLS_beta.R | no_license | ingted/R-Examples | R | false | false | 52,900 | r | PLS_beta <- function(dataY,dataX,nt=2,limQ2set=.0975,dataPredictY=dataX,modele="pls",family=NULL,typeVC="none",EstimXNA=FALSE,scaleX=TRUE,scaleY=NULL,pvals.expli=FALSE,alpha.pvals.expli=.05,MClassed=FALSE,tol_Xi=10^(-12),weights,method,sparse=FALSE,sparseStop=TRUE,naive=FALSE,link=NULL,link.phi=NULL,type="ML") {
##... |
contractions <- read.csv2("contractions.csv",stringsAsFactors=FALSE)
transvr <- names(vr)
for (i in 1:nrow(contractions)) {
from <- paste0("^",contractions[i,"word"],"$")
to <- contractions[i,"trans"]
transvr <- gsub(from,to,transvr)
}
names(vr) <- transvr
save(vr,file="data/vocabulary-reduced.r... | /trans-contractions.R | no_license | mreeddev/wordprev | R | false | false | 373 | r | contractions <- read.csv2("contractions.csv",stringsAsFactors=FALSE)
transvr <- names(vr)
for (i in 1:nrow(contractions)) {
from <- paste0("^",contractions[i,"word"],"$")
to <- contractions[i,"trans"]
transvr <- gsub(from,to,transvr)
}
names(vr) <- transvr
save(vr,file="data/vocabulary-reduced.r... |
#' CYTARPersonas
#' @author kenarab
#' @importFrom R6 R6Class
#' @import dplyr
#' @import magrittr
#' @import testthat
#' @export
CYTARPersonas <- R6Class("CYTARPersonas",
inherit = CYTARDatasource,
public = list(
initialize = function(){
super$initialize(data.url = "https://datasets.datos.mincyt.gob.ar/data... | /R/cytar-personas.R | no_license | rOpenStats/CYTAR | R | false | false | 5,559 | r |
#' CYTARPersonas
#' @author kenarab
#' @importFrom R6 R6Class
#' @import dplyr
#' @import magrittr
#' @import testthat
#' @export
CYTARPersonas <- R6Class("CYTARPersonas",
inherit = CYTARDatasource,
public = list(
initialize = function(){
super$initialize(data.url = "https://datasets.datos.mincyt.gob.ar/data... |
\name{determinant.lrpd}
\alias{determinant.lrpd}
\title{
Determinant
}
\description{
This function efficiently computes the determinant of an lrpd matrix.
}
\usage{
\method{determinant}{lrpd}(object, logarithm = TRUE, ...)
}
\arguments{
\item{object}{
an object of class "lrpd".
}
\item{logarithm}{
logical; If TRUE ... | /lrpd/man/determinant.lrpd.Rd | no_license | ericyewang/R-Package-lrpd | R | false | false | 993 | rd | \name{determinant.lrpd}
\alias{determinant.lrpd}
\title{
Determinant
}
\description{
This function efficiently computes the determinant of an lrpd matrix.
}
\usage{
\method{determinant}{lrpd}(object, logarithm = TRUE, ...)
}
\arguments{
\item{object}{
an object of class "lrpd".
}
\item{logarithm}{
logical; If TRUE ... |
library(tidyverse)
library(plotly)
# read in data
df <- readr::read_csv("./data/citibike-tripdata.csv")
# create a summary table
# create a bar plot
ggplot() +
geom_bar(stat="identity", show.legend=F) +
ggtitle("Total Rides by Station") +
theme(plot.title = element_text(hjust = 0.5)) +
scale_x_discre... | /02_project/eda.R | no_license | awaagner/shiny_workshop | R | false | false | 497 | r | library(tidyverse)
library(plotly)
# read in data
df <- readr::read_csv("./data/citibike-tripdata.csv")
# create a summary table
# create a bar plot
ggplot() +
geom_bar(stat="identity", show.legend=F) +
ggtitle("Total Rides by Station") +
theme(plot.title = element_text(hjust = 0.5)) +
scale_x_discre... |
#!/usr/bin/env Rscript
cat("\n---1) Updating local Git repository...\n\n")
system("git tag -d $(git tag)") #deletes local tags
system("git fetch --all") #fetches all remotes into local repo, including tags.
system("git checkout master")
cat("\n--2) Listing available SciServer version tags:\n\n")
tags = system('git ta... | /ShowSciServerTags.R | permissive | jonashaase/SciScript-R | R | false | false | 573 | r | #!/usr/bin/env Rscript
cat("\n---1) Updating local Git repository...\n\n")
system("git tag -d $(git tag)") #deletes local tags
system("git fetch --all") #fetches all remotes into local repo, including tags.
system("git checkout master")
cat("\n--2) Listing available SciServer version tags:\n\n")
tags = system('git ta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BASiCS_RegressionDE.R
\name{BASiCS_RegressionDE}
\alias{BASiCS_RegressionDE}
\title{Detection of genes with changes in expression using linear regression}
\usage{
BASiCS_RegressionDE(
Chains,
ModelMatrix,
EFDR_M = 0.05,
EFDR_D = 0.05,... | /man/BASiCS_RegressionDE.Rd | no_license | nstroustrup/HelpingHand | R | false | true | 5,057 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BASiCS_RegressionDE.R
\name{BASiCS_RegressionDE}
\alias{BASiCS_RegressionDE}
\title{Detection of genes with changes in expression using linear regression}
\usage{
BASiCS_RegressionDE(
Chains,
ModelMatrix,
EFDR_M = 0.05,
EFDR_D = 0.05,... |
#!/usr/bin/env Rscript
# mcmc-odesim.R
# authors: Ephraim Hanks, Nathan Wikle, Emily Strong
# last edited: 20 Nov 2020
#
# This file defines the mcmc.odesim function, which generates
# samples from the posterior of all model parameters using
# MCMC. A large number of function arguments are available
# (see func... | /Nov2020/inference/code/mcmc-odesim.R | no_license | bonilab/covid19-reopening-RI-MA-PA | R | false | false | 42,685 | r | #!/usr/bin/env Rscript
# mcmc-odesim.R
# authors: Ephraim Hanks, Nathan Wikle, Emily Strong
# last edited: 20 Nov 2020
#
# This file defines the mcmc.odesim function, which generates
# samples from the posterior of all model parameters using
# MCMC. A large number of function arguments are available
# (see func... |
library(mytestpkg)
context("test if my first package works")
test_that("my function works", {
expect_equal(followers(5), c(5, 6, 7))
})
test_that("my second function works", {
expect_equal(half(10), 5)
})
| /tests/testthat/tests.R | no_license | joanaseg/mytestpkg | R | false | false | 213 | r | library(mytestpkg)
context("test if my first package works")
test_that("my function works", {
expect_equal(followers(5), c(5, 6, 7))
})
test_that("my second function works", {
expect_equal(half(10), 5)
})
|
#' Estimate the Survival Curve
#'
#' Return the predicted survival probability at each unique time point
#' @param PosteriorDraws Matrix of random draws from the posterior distribution
#' of the survival curve.
#' @export
SurvEst = function(PosteriorDraws) {
return(apply(PosteriorDraws, 2, mean))
} | /R/SurvEst.R | no_license | nillen0/SurvBART | R | false | false | 303 | r | #' Estimate the Survival Curve
#'
#' Return the predicted survival probability at each unique time point
#' @param PosteriorDraws Matrix of random draws from the posterior distribution
#' of the survival curve.
#' @export
SurvEst = function(PosteriorDraws) {
return(apply(PosteriorDraws, 2, mean))
} |
#' @title Applying 3 adequacy tests to the Random walk model
#'
#' @description Investigating if the Random walk model is an adequate statistical description of an evolutionary
#' time series by applying the following tests (1) autocorrelation (2) runs test, and (3) constant variation.
#'
#' @param y a paleoTS object
#... | /R/fit3adequacy.RW.R | no_license | klvoje/adePEM | R | false | false | 5,351 | r | #' @title Applying 3 adequacy tests to the Random walk model
#'
#' @description Investigating if the Random walk model is an adequate statistical description of an evolutionary
#' time series by applying the following tests (1) autocorrelation (2) runs test, and (3) constant variation.
#'
#' @param y a paleoTS object
#... |
# create a gergm from a formula object (getgergm)
Create_GERGM_Object_From_Formula <- function(object,
theta.coef,
possible_structural_terms,
possible_covariate_terms,
... | /R/Create_GERGM_Object_From_Formula.R | no_license | fototo/GERGM | R | false | false | 4,620 | r | # create a gergm from a formula object (getgergm)
Create_GERGM_Object_From_Formula <- function(object,
theta.coef,
possible_structural_terms,
possible_covariate_terms,
... |
library('tidyverse')
library('gganimate')
deaths <- read_csv('deaths.csv') # http://fridaythe13th.wikia.com/wiki/List_of_deaths_in_the_Friday_the_13th_films
deaths.totals <- deaths %>% filter(`On-Screen Death?` == 'Yes') %>% select(Film, Name) %>%
group_by(Film) %>%
mutate(n = row_number(), total.deaths = max(n))... | /code.R | no_license | underthecurve/friday-the-13 | R | false | false | 1,598 | r | library('tidyverse')
library('gganimate')
deaths <- read_csv('deaths.csv') # http://fridaythe13th.wikia.com/wiki/List_of_deaths_in_the_Friday_the_13th_films
deaths.totals <- deaths %>% filter(`On-Screen Death?` == 'Yes') %>% select(Film, Name) %>%
group_by(Film) %>%
mutate(n = row_number(), total.deaths = max(n))... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cfbd_teams.R
\name{cfbd_teams}
\alias{cfbd_teams}
\title{\strong{CFBD Teams Endpoint Overview}}
\description{
\describe{
\item{\code{cfbd_team_info()}:}{ Team Info Lookup.}
\item{\code{cfbd_team_roster()}:}{ Get a team's full roster by year.}... | /man/cfbd_teams.Rd | permissive | Engy-22/cfbfastR | R | false | true | 2,274 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cfbd_teams.R
\name{cfbd_teams}
\alias{cfbd_teams}
\title{\strong{CFBD Teams Endpoint Overview}}
\description{
\describe{
\item{\code{cfbd_team_info()}:}{ Team Info Lookup.}
\item{\code{cfbd_team_roster()}:}{ Get a team's full roster by year.}... |
## Function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
get... | /cachematrix.R | no_license | katkadz/Coursera_Functions | R | false | false | 1,011 | r | ## Function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
get... |
#!/usr/bin/env Rscript
#args = commandArgs(TRUE)
#if (length(args) == 0) {
# cat ("ERROR: Scenario parameters should be specified\n")
# q(status = 1)
#}
prefixes = "fairness,satisfaction-accept,satisfaction-pushback"
topo = "7018.r0"
evils = "140"
runs = "1,2,3,4,5,6,7,8,9,10"
folder = "attackISP"
good... | /satisfaction-min-max-vs-time.R | no_license | iyonr/ndn-graph | R | false | false | 3,288 | r | #!/usr/bin/env Rscript
#args = commandArgs(TRUE)
#if (length(args) == 0) {
# cat ("ERROR: Scenario parameters should be specified\n")
# q(status = 1)
#}
prefixes = "fairness,satisfaction-accept,satisfaction-pushback"
topo = "7018.r0"
evils = "140"
runs = "1,2,3,4,5,6,7,8,9,10"
folder = "attackISP"
good... |
\name{periodify} %DontDeclareMethods
\alias{periodify}
\alias{periodify.owin}
\alias{periodify.ppp}
\alias{periodify.psp}
\title{
Make Periodic Copies of a Spatial Pattern
}
\description{
Given a spatial pattern (point pattern, line segment pattern,
window, etc) make shifted copies of the pattern
and optional... | /man/periodify.Rd | no_license | jdtuck/spatstat | R | false | false | 3,896 | rd | \name{periodify} %DontDeclareMethods
\alias{periodify}
\alias{periodify.owin}
\alias{periodify.ppp}
\alias{periodify.psp}
\title{
Make Periodic Copies of a Spatial Pattern
}
\description{
Given a spatial pattern (point pattern, line segment pattern,
window, etc) make shifted copies of the pattern
and optional... |
\name{DAVIDToolChoices}
\alias{DAVIDToolChoices}
\alias{DAVIDTypeChoices}
\alias{DAVIDAnnotChoices}
\alias{DAVIDAffyChipChoices}
\docType{data}
\title{ Choices for the DAVID query parameters }
\description{
DAVIDToolChoices, DAVIDTypeChoices, DAVIDAnnotChoices and DAVIDAffyChipChoices are data structures used... | /OtherPackages/DAVIDQuery/man/DAVIDToolChoices.Rd | no_license | rikenbit/PubMedQuery | R | false | false | 1,163 | rd | \name{DAVIDToolChoices}
\alias{DAVIDToolChoices}
\alias{DAVIDTypeChoices}
\alias{DAVIDAnnotChoices}
\alias{DAVIDAffyChipChoices}
\docType{data}
\title{ Choices for the DAVID query parameters }
\description{
DAVIDToolChoices, DAVIDTypeChoices, DAVIDAnnotChoices and DAVIDAffyChipChoices are data structures used... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Exponential.R
\name{quantile.Exponential}
\alias{quantile.Exponential}
\title{Determine quantiles of a Exponential distribution}
\usage{
\method{quantile}{Exponential}(d, p, ...)
}
\arguments{
\item{d}{A \code{Exponential} object created by a... | /man/quantile.exponential.Rd | permissive | nfultz/distributions3 | R | false | true | 871 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Exponential.R
\name{quantile.Exponential}
\alias{quantile.Exponential}
\title{Determine quantiles of a Exponential distribution}
\usage{
\method{quantile}{Exponential}(d, p, ...)
}
\arguments{
\item{d}{A \code{Exponential} object created by a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/402.p-Confidence_p-Bias_BASE_All_Graph.R
\name{PlotpCOpBIEX}
\alias{PlotpCOpBIEX}
\title{Plots of p-confidence and p-bias of Exact method given n and alpha level}
\usage{
PlotpCOpBIEX(n, alp, e)
}
\arguments{
\item{n}{- Number of tri... | /man/PlotpCOpBIEX.Rd | no_license | cran/proportion | R | false | true | 1,920 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/402.p-Confidence_p-Bias_BASE_All_Graph.R
\name{PlotpCOpBIEX}
\alias{PlotpCOpBIEX}
\title{Plots of p-confidence and p-bias of Exact method given n and alpha level}
\usage{
PlotpCOpBIEX(n, alp, e)
}
\arguments{
\item{n}{- Number of tri... |
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... | /utils/R/utils.R | permissive | serbinsh/pecan | R | false | false | 26,618 | r | #-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core_use_compendium.R
\name{use_compendium}
\alias{use_compendium}
\title{Creates an R package suitable to use as a research compendium, and
switches to the working directory of this new package, ready to work}
\usage{
use_compendium(
path ... | /man/use_compendium.Rd | permissive | jimsforks/rrtools | R | false | true | 1,272 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core_use_compendium.R
\name{use_compendium}
\alias{use_compendium}
\title{Creates an R package suitable to use as a research compendium, and
switches to the working directory of this new package, ready to work}
\usage{
use_compendium(
path ... |
#!/usr/bin/env Rscript
#options(stringsAsFactors=F)
pseudocount = 1e-04
cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
##################
# OPTION PARSING
##################
suppressPackageStartupMessages(library("optparse"))
option_list <- list(
make_opt... | /Coverage/read.genomic.coverage.R | permissive | ahalfpen727/Bioconductor-Resources | R | false | false | 3,675 | r | #!/usr/bin/env Rscript
#options(stringsAsFactors=F)
pseudocount = 1e-04
cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
##################
# OPTION PARSING
##################
suppressPackageStartupMessages(library("optparse"))
option_list <- list(
make_opt... |
### sbracalbca bottom calculations
modelAFT = read.csv(file ='C:/Users/twili/OneDrive/Documents/Classes/MAT 596/code/Results/modelsbrcalbca.csv')
gof=matrix(0,nrow=3,ncol=3)
colnames(gof)=c("DIC","pD","Dbar")
rownames(gof)=c("BrCa","LBCa","Total")
gof[1:2,3]=modelAFT[98:99,2]#D1,D2 means
# sd of D2 is Zero, issue in c... | /code/CodeForJC/CheckDIC.R | no_license | carrollrm/sptl_temp_cancer | R | false | false | 2,914 | r |
### sbracalbca bottom calculations
modelAFT = read.csv(file ='C:/Users/twili/OneDrive/Documents/Classes/MAT 596/code/Results/modelsbrcalbca.csv')
gof=matrix(0,nrow=3,ncol=3)
colnames(gof)=c("DIC","pD","Dbar")
rownames(gof)=c("BrCa","LBCa","Total")
gof[1:2,3]=modelAFT[98:99,2]#D1,D2 means
# sd of D2 is Zero, issue in c... |
plotlyErlangDistribution <- function(plotrange, input, distType, probrange) {
}
| /plotlyFunctions/Erlang.R | no_license | SOCR/ProbDistCalc_RShiny | R | false | false | 80 | r | plotlyErlangDistribution <- function(plotrange, input, distType, probrange) {
}
|
##############################################################################
# Copyright (c) 2012-2016 Russell V. Lenth #
# #
# This file is part of the lsmeans package for R (*lsmeans*) #
... | /R/aovlist-support.R | no_license | jonathon-love/lsmeans | R | false | false | 6,243 | r | ##############################################################################
# Copyright (c) 2012-2016 Russell V. Lenth #
# #
# This file is part of the lsmeans package for R (*lsmeans*) #
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_model.R
\name{run_model}
\alias{run_model}
\title{Run the model over time}
\usage{
run_model(steps, initLand, managInt = c(0, 0, 0, 0), RCP = 0,
stoch = TRUE, cores = 1, outputLand = NA, rangeLimitOccup = NULL,
stateOccup = FALSE, sav... | /man/run_model.Rd | permissive | willvieira/STManaged | R | false | true | 3,838 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_model.R
\name{run_model}
\alias{run_model}
\title{Run the model over time}
\usage{
run_model(steps, initLand, managInt = c(0, 0, 0, 0), RCP = 0,
stoch = TRUE, cores = 1, outputLand = NA, rangeLimitOccup = NULL,
stateOccup = FALSE, sav... |
# for "html tables a la rstudio::conf(2018)", see:
# https://beta.rstudioconnect.com/content/3105/
rstudio <- tibble(
name = list("bash ninja", "html tables a la rstudio::conf(2018)",
"flesh out google sheets as a backend for shiny app data",
"look into shiny.collections",
"pivot tables", "grable", "too... | /modules/rstudio.R | no_license | bborgesr/sandbox | R | false | false | 979 | r |
# for "html tables a la rstudio::conf(2018)", see:
# https://beta.rstudioconnect.com/content/3105/
rstudio <- tibble(
name = list("bash ninja", "html tables a la rstudio::conf(2018)",
"flesh out google sheets as a backend for shiny app data",
"look into shiny.collections",
"pivot tables", "grable", "too... |
#' Updated function to add plot to table
#'
#' @param x Numeric vectors for position coord.
#' @param y Numeric vectors for position coord.
#' @param table Data table to add.
#' @param lwd,bty,bg,cex,xjust,yjust,xpad,ypad See par for details.
#' @param box.col,text.col,col.rowname,col.colname Details for color of bg an... | /R/addtable2plot.new.R | no_license | foramashar/fashaR | R | false | false | 5,875 | r | #' Updated function to add plot to table
#'
#' @param x Numeric vectors for position coord.
#' @param y Numeric vectors for position coord.
#' @param table Data table to add.
#' @param lwd,bty,bg,cex,xjust,yjust,xpad,ypad See par for details.
#' @param box.col,text.col,col.rowname,col.colname Details for color of bg an... |
#'@title Multiply two vectors
#'@description
#'This function multiplies two numeric vectors and returns
#'a numeric vector
#'
#'@param x a numeric vector
#'@param y a numeric vector
#'
#'@return a numeric vector
#'
#'@export
#'
#'@examples
#'multiply(2, 3)
#'multiply(mtcars$mpg, mtcars$hp)
multiply <- function(x, y){... | /R/multiply.R | permissive | marginal-latte/mathR | R | false | false | 329 | r | #'@title Multiply two vectors
#'@description
#'This function multiplies two numeric vectors and returns
#'a numeric vector
#'
#'@param x a numeric vector
#'@param y a numeric vector
#'
#'@return a numeric vector
#'
#'@export
#'
#'@examples
#'multiply(2, 3)
#'multiply(mtcars$mpg, mtcars$hp)
multiply <- function(x, y){... |
library(gofMC)
### Name: KS_D
### Title: KS_D
### Aliases: KS_D
### ** Examples
KS_D(c(1,2,3,4,5),c(1,2,3,4,4))
KS_D(matrix(runif(100),ncol=7),matrix(runif(100),ncol=7))
| /data/genthat_extracted_code/gofMC/examples/KS_D.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 178 | r | library(gofMC)
### Name: KS_D
### Title: KS_D
### Aliases: KS_D
### ** Examples
KS_D(c(1,2,3,4,5),c(1,2,3,4,4))
KS_D(matrix(runif(100),ncol=7),matrix(runif(100),ncol=7))
|
####################################################
###### The volatility updating rule ##
####################################################
ht<-function(para_h,Data.ret){
rt=Data.ret$rt/250 #### Interest rate Data : Data.BSJ$rt
ret =Data.ret$ret #### Returns : Data.BSJ$ret
... | /Simulation_juin2018/Estimation Paper 2 juin 2016/HN - verification/VIX Heston N/HN MLE/RMSE VIX HN.R | no_license | Fanirisoa/dynamic_pricing | R | false | false | 4,289 | r | ####################################################
###### The volatility updating rule ##
####################################################
ht<-function(para_h,Data.ret){
rt=Data.ret$rt/250 #### Interest rate Data : Data.BSJ$rt
ret =Data.ret$ret #### Returns : Data.BSJ$ret
... |
# AUTO_DETECT_NEWVAR <- FALSE
notify <- function() {
e <- get("e", parent.frame())
if(e$val == "No") return(TRUE)
good <- FALSE
while(!good) {
# Get info
name <- readline_clean("What is your full name? ")
address <- readline_clean("What is the email address of the person you'd like to notify? ")... | /Looking_at_Data/customTests.R | no_license | angieluis/Swirl_TheoreticalEcology | R | false | false | 1,450 | r | # AUTO_DETECT_NEWVAR <- FALSE
notify <- function() {
e <- get("e", parent.frame())
if(e$val == "No") return(TRUE)
good <- FALSE
while(!good) {
# Get info
name <- readline_clean("What is your full name? ")
address <- readline_clean("What is the email address of the person you'd like to notify? ")... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{lines_to_board}
\alias{lines_to_board}
\title{lines_to_board, helper function for read_boards}
\usage{
lines_to_board(line)
}
\arguments{
\item{line}{turn the lines into boards}
}
\value{
turn the lines into boards
}
\descriptio... | /man/lines_to_board.Rd | no_license | rebeccapei16/percolate | R | false | true | 373 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{lines_to_board}
\alias{lines_to_board}
\title{lines_to_board, helper function for read_boards}
\usage{
lines_to_board(line)
}
\arguments{
\item{line}{turn the lines into boards}
}
\value{
turn the lines into boards
}
\descriptio... |
#Are nestlings fledging at a lower weight than they did in the past?
#I'm interested in knowing this because it could help explain why we see
#differences in recruitment across years. It could also explain why local
#weather conditions only affect survival when the population is declining. If
#the juveniles are poor ... | /Nestling Mass through time.R | no_license | 11arc4/Weather-related-mortality-and-growth | R | false | false | 9,383 | r | #Are nestlings fledging at a lower weight than they did in the past?
#I'm interested in knowing this because it could help explain why we see
#differences in recruitment across years. It could also explain why local
#weather conditions only affect survival when the population is declining. If
#the juveniles are poor ... |
`mudiff.mblmodwoc` <-
function(len,alpha1,beta1,alpha2,beta2,level=0.95,worst.level=0.95,m=50000,mcs=3)
{
min.for.possible.return <- 2^ceiling(1.5*mcs)
# If we always allow a return, there is a risk of making bad steps
# when we are close to the answer.
# Thus, we should not allow any return once some a... | /R/mudiff.mblmodwoc.R | no_license | cran/SampleSizeMeans | R | false | false | 4,285 | r | `mudiff.mblmodwoc` <-
function(len,alpha1,beta1,alpha2,beta2,level=0.95,worst.level=0.95,m=50000,mcs=3)
{
min.for.possible.return <- 2^ceiling(1.5*mcs)
# If we always allow a return, there is a risk of making bad steps
# when we are close to the answer.
# Thus, we should not allow any return once some a... |
#################################################################################################
###This code will generate grower reports by:
#1.bring in the strip data for a site
#2.run paired t-test,
#3.create plots
#4.Accesses lab results and generates reports
## Approach using polygon to pull out raw yield d... | /Landmark/Matt_Nihill/Jenharwil_2/James_tidy.R | no_license | JackieOuzman/strip_graphs | R | false | false | 26,988 | r |
#################################################################################################
###This code will generate grower reports by:
#1.bring in the strip data for a site
#2.run paired t-test,
#3.create plots
#4.Accesses lab results and generates reports
## Approach using polygon to pull out raw yield d... |
multiple <- function(x) {
for (i in 1:999) {
if (i %% 3 == 0 || i%% 5 == 0) {
x[i] = i
}
else {
x[i] = 0
}
}
y <- x[x != 0]
sum(y)
} | /r.R | no_license | Onikepe/R-Programming- | R | false | false | 154 | r | multiple <- function(x) {
for (i in 1:999) {
if (i %% 3 == 0 || i%% 5 == 0) {
x[i] = i
}
else {
x[i] = 0
}
}
y <- x[x != 0]
sum(y)
} |
make.control <- function(mainType = NULL,
dataFile = NULL,
treeFile = NULL,
outDir = NULL,
maxChrNum = NULL,
minChrNum = NULL,
branchMul = NULL,
... | /analysis/rscripts/12.make.control.R | no_license | Tsylvester8/Polyneoptera | R | false | false | 3,415 | r | make.control <- function(mainType = NULL,
dataFile = NULL,
treeFile = NULL,
outDir = NULL,
maxChrNum = NULL,
minChrNum = NULL,
branchMul = NULL,
... |
# ************************************************************ #
# Get stratified representative sample of the entire population of land parcels
# ************************************************************ #
# outputs:
# representative samples of each matched scale from the unmatched data
# based on https://gist.git... | /06_stratifiedRepresentativeSample.R | permissive | pacheco-andrea/tenure-defor-br | R | false | false | 4,907 | r | # ************************************************************ #
# Get stratified representative sample of the entire population of land parcels
# ************************************************************ #
# outputs:
# representative samples of each matched scale from the unmatched data
# based on https://gist.git... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -1.24269601614303e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615768329-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -1.24269601614303e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
## stocks
stock.names <- c('wolfimm','wolfmat')
## Collect catches by fleet:
lln.landings <- mfdb_sample_count(mdb, c('age', 'length'), c(list(
gear=c('HLN','LLN'),
sampling_type = 'LND',
species = defaults$species),
defaults))
bmt.landings <- mfdb_... | /09-wolf/00-data/setup-fleets.R | no_license | bthe/gadget-models | R | false | false | 3,359 | r | ## stocks
stock.names <- c('wolfimm','wolfmat')
## Collect catches by fleet:
lln.landings <- mfdb_sample_count(mdb, c('age', 'length'), c(list(
gear=c('HLN','LLN'),
sampling_type = 'LND',
species = defaults$species),
defaults))
bmt.landings <- mfdb_... |
#' reshape_poly
#'
#' @param poly
#' @param poly_before
#' @param name_of_unit
#' @keywords
#' @keywords
#' @export
#' @examples
#' @importFrom magrittr %>%
#'
#'
reshape_poly<-function(poly,poly_before,name_of_unit) {
poly@data<-cbind(poly_before@data,poly@data,
row.names = NULL)
poly@data[,grep... | /R/reshape_poly.R | no_license | senickel/geosampling | R | false | false | 733 | r | #' reshape_poly
#'
#' @param poly
#' @param poly_before
#' @param name_of_unit
#' @keywords
#' @keywords
#' @export
#' @examples
#' @importFrom magrittr %>%
#'
#'
reshape_poly<-function(poly,poly_before,name_of_unit) {
poly@data<-cbind(poly_before@data,poly@data,
row.names = NULL)
poly@data[,grep... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeTag.R
\name{makeTag}
\alias{makeTag}
\title{Create a tag from DMS and CV filenames and a user tag.}
\usage{
makeTag(CVTable, msTable, userTag)
}
\arguments{
\item{CVTable}{(string) name of CV file.}
\item{msTable}{(string) name of ms fil... | /man/makeTag.Rd | no_license | ppernot/msAnaLib | R | false | true | 462 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeTag.R
\name{makeTag}
\alias{makeTag}
\title{Create a tag from DMS and CV filenames and a user tag.}
\usage{
makeTag(CVTable, msTable, userTag)
}
\arguments{
\item{CVTable}{(string) name of CV file.}
\item{msTable}{(string) name of ms fil... |
#Necesita para correr en Google Cloud
#16 GB de memoria RAM
#256 GB de espacio en el disco local
#4 vCPU
# LightGBM con min_data_in_leaf= 4000 y quitando "mpasivos_margen"
#limpio la memoria
rm( list=ls() ) #remove all objects
gc() #garbage collection
require("data.table")
require("lightgbm")
setwd("~... | /clasesGustavo/TareasHogar/Tarea20210917/612_lgb_drift_P.r | no_license | gerbeldo/labo2021 | R | false | false | 1,716 | r | #Necesita para correr en Google Cloud
#16 GB de memoria RAM
#256 GB de espacio en el disco local
#4 vCPU
# LightGBM con min_data_in_leaf= 4000 y quitando "mpasivos_margen"
#limpio la memoria
rm( list=ls() ) #remove all objects
gc() #garbage collection
require("data.table")
require("lightgbm")
setwd("~... |
test_that("Time period feature flags are enabled within specified boundaries", {
feature_flag <- create_time_period_feature_flag(
from = ISOdatetime(2020, 1, 1, 10, 0, 0, tz = "UTC"),
to = ISOdatetime(2020, 1, 1, 13, 0, 0, tz = "UTC")
)
sys_time_stub <- function() ISOdatetime(2020, 1, 1, 12, 0, 0, tz = "... | /tests/testthat/test-feature_flag-time_period.R | permissive | szymanskir/featureflag | R | false | false | 2,523 | r | test_that("Time period feature flags are enabled within specified boundaries", {
feature_flag <- create_time_period_feature_flag(
from = ISOdatetime(2020, 1, 1, 10, 0, 0, tz = "UTC"),
to = ISOdatetime(2020, 1, 1, 13, 0, 0, tz = "UTC")
)
sys_time_stub <- function() ISOdatetime(2020, 1, 1, 12, 0, 0, tz = "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{beta30}
\alias{beta30}
\title{Beta 30}
\format{A list of 30 rows in 1 variable
\describe{
\item{x}{observations from beta distribution}
}}
\usage{
beta30
}
\description{
A data set containg 30 observations generate... | /man/beta30.Rd | no_license | joemckean/mathstat | R | false | true | 547 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{beta30}
\alias{beta30}
\title{Beta 30}
\format{A list of 30 rows in 1 variable
\describe{
\item{x}{observations from beta distribution}
}}
\usage{
beta30
}
\description{
A data set containg 30 observations generate... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{trip_match_v3}
\alias{trip_match_v3}
\title{trip matching algorithm R version 3.}
\usage{
trip_match_v3(M1, M2, dist_cut = 0.001, heading_cut = 0.01,
match_n_cut = 5)
}
\arguments{
\item{M1}{.}
\item{M2}{.}
\item... | /man/trip_match_v3.Rd | no_license | rapanzuena/PathMatch | R | false | true | 500 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{trip_match_v3}
\alias{trip_match_v3}
\title{trip matching algorithm R version 3.}
\usage{
trip_match_v3(M1, M2, dist_cut = 0.001, heading_cut = 0.01,
match_n_cut = 5)
}
\arguments{
\item{M1}{.}
\item{M2}{.}
\item... |
source("/srv/shiny-server/helper/mysql/con_mysql.R")
source("/srv/shiny-server/helper/mysql/json_df2.R")
#############################
######## constant #########
#############################
DATA_TABLE <- "boatinternational_com"
BUILDER <- "Builder"
NAME <- "Name"
PRICE <- "price"
YEAR <- "Year.of.Build"
LOA <-... | /shiny-server/boatinternational/cleaning.R | no_license | kent119/R-shiny-yachting-market-research | R | false | false | 2,388 | r | source("/srv/shiny-server/helper/mysql/con_mysql.R")
source("/srv/shiny-server/helper/mysql/json_df2.R")
#############################
######## constant #########
#############################
DATA_TABLE <- "boatinternational_com"
BUILDER <- "Builder"
NAME <- "Name"
PRICE <- "price"
YEAR <- "Year.of.Build"
LOA <-... |
# server.R
library(shiny)
library(ggplot2)
library(gridExtra)
library(ggthemes)
library(dplyr)
library(scales)
# runApp('C:/Users/Paul/Documents/R/Applications/Mortgage')
# term=30; principal=236000; down=0.2; interest=0.0425; irr=0.05
simulate_data = function(term, principal, down, interest, irr) {
n_months = t... | /Personal/Data-Vis-Apps/Mortgage-Simulator/server.R | no_license | paulmattheww/Original-Projects | R | false | false | 3,588 | r | # server.R
library(shiny)
library(ggplot2)
library(gridExtra)
library(ggthemes)
library(dplyr)
library(scales)
# runApp('C:/Users/Paul/Documents/R/Applications/Mortgage')
# term=30; principal=236000; down=0.2; interest=0.0425; irr=0.05
simulate_data = function(term, principal, down, interest, irr) {
n_months = t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/count_each_column.R
\name{count_each_column}
\alias{count_each_column}
\title{Counting Each Column and Summarizing in a Matrix}
\usage{
count_each_column(x, answer = NULL, checks = TRUE)
}
\arguments{
\item{x}{a data frame or matrix with at l... | /man/count_each_column.Rd | no_license | cran/plothelper | R | false | true | 1,777 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/count_each_column.R
\name{count_each_column}
\alias{count_each_column}
\title{Counting Each Column and Summarizing in a Matrix}
\usage{
count_each_column(x, answer = NULL, checks = TRUE)
}
\arguments{
\item{x}{a data frame or matrix with at l... |
#' plotme2
#'
#' @title plotme2
#' @Description Used for a 2 variable ggplot
#'
#' @param plotdata data
#' @param x column number of x coordinate
#' @param y column number of y coordinate
#'
#' @return a plot
#'
#' @examples
#' plotme2(data,1,2)
#'
#' @importfrom ggplot2 ggplot
#'
#' @export plotme2
plotme2 <- functio... | /R/plotme2.R | no_license | Lewismews/example_package | R | false | false | 637 | r | #' plotme2
#'
#' @title plotme2
#' @Description Used for a 2 variable ggplot
#'
#' @param plotdata data
#' @param x column number of x coordinate
#' @param y column number of y coordinate
#'
#' @return a plot
#'
#' @examples
#' plotme2(data,1,2)
#'
#' @importfrom ggplot2 ggplot
#'
#' @export plotme2
plotme2 <- functio... |
\name{ReadDvnFile}
\alias{ReadDvnFile}
\title{Read a DVN File...}
\usage{ReadDvnFile(file, pkg)}
\description{Read a DVN File}
\details{...}
\value{...}
\arguments{\item{file}{a character-string specifying a file name}
\item{pkg}{a character-string specifying a package in which to find a file}}
| /man/ReadDvnFile.Rd | no_license | zeligdev/ZeligDVN | R | false | false | 296 | rd | \name{ReadDvnFile}
\alias{ReadDvnFile}
\title{Read a DVN File...}
\usage{ReadDvnFile(file, pkg)}
\description{Read a DVN File}
\details{...}
\value{...}
\arguments{\item{file}{a character-string specifying a file name}
\item{pkg}{a character-string specifying a package in which to find a file}}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter-dm.R
\name{cdm_filter}
\alias{cdm_filter}
\alias{cdm_apply_filters}
\title{Filtering a \code{\link{dm}} object}
\usage{
cdm_filter(dm, table, ...)
cdm_apply_filters(dm)
}
\arguments{
\item{dm}{A \code{dm} object.}
\item{table}{A tabl... | /man/cdm_filter.Rd | permissive | cutterkom/dm | R | false | true | 2,704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter-dm.R
\name{cdm_filter}
\alias{cdm_filter}
\alias{cdm_apply_filters}
\title{Filtering a \code{\link{dm}} object}
\usage{
cdm_filter(dm, table, ...)
cdm_apply_filters(dm)
}
\arguments{
\item{dm}{A \code{dm} object.}
\item{table}{A tabl... |
## First Lab
character <- "first string in R"
numeric <- 42.2
integer <- 42L
complex <- 42 + 42i
logical <- TRUE
all <- list(character, numeric, integer, complex, logical)
for (var in all) { print(typeof(var)) }
vector1 <- 5:75
vector2 <- c(3.14, 2.71, 0, 13)
vector3 <- rep(TRUE, 100)
m <- rbind(list(0.5, 1.3, 3.5),... | /all.R | no_license | livankrekh/R_PythonCourseKNU | R | false | false | 985 | r | ## First Lab
character <- "first string in R"
numeric <- 42.2
integer <- 42L
complex <- 42 + 42i
logical <- TRUE
all <- list(character, numeric, integer, complex, logical)
for (var in all) { print(typeof(var)) }
vector1 <- 5:75
vector2 <- c(3.14, 2.71, 0, 13)
vector3 <- rep(TRUE, 100)
m <- rbind(list(0.5, 1.3, 3.5),... |
## Part 1 ----
(observed_cor <- cor(cars$speed, cars$dist))
## Part 2 ----
n_reps <- 10000
perm_cars <- cars
perm_stats <- replicate(n_reps, {
perm_cars$speed <- sample(perm_cars$speed)
cor(perm_cars$speed, perm_cars$dist)
})
## Part 3 ----
library(ggplot2)
ggplot(mapping = aes(x = perm_stats)) +
geom_density()... | /solutions/06/exam2_cars_sol.R | no_license | byu-stat-223/practice-finals | R | false | false | 723 | r | ## Part 1 ----
(observed_cor <- cor(cars$speed, cars$dist))
## Part 2 ----
n_reps <- 10000
perm_cars <- cars
perm_stats <- replicate(n_reps, {
perm_cars$speed <- sample(perm_cars$speed)
cor(perm_cars$speed, perm_cars$dist)
})
## Part 3 ----
library(ggplot2)
ggplot(mapping = aes(x = perm_stats)) +
geom_density()... |
# source reactive expressions
source("external/appSourceFiles/reactives.R",local=T)
source("external/appSourceFiles/movie_benchmark_plot.R",local=T)
# Primary outputs ---------------------------------------------------------
output$ex1 <- DT::renderDataTable({
if (input$password_input == password) {
action = da... | /external/app.R | no_license | leoluyi/disney_movie_app | R | false | false | 2,543 | r | # source reactive expressions
source("external/appSourceFiles/reactives.R",local=T)
source("external/appSourceFiles/movie_benchmark_plot.R",local=T)
# Primary outputs ---------------------------------------------------------
output$ex1 <- DT::renderDataTable({
if (input$password_input == password) {
action = da... |
getXSkip = function(x, pastrounds)
{
interval = x[['treatment_interval']]
data_pastrounds = as.numeric(x[['pastrounds']])
data_futurerounds = as.numeric(x[['futurerounds']])
skip = 0
if((data_pastrounds == pastrounds) && (data_futurerounds > 0)){
if(interval == "Future annual treatment"){
skip = ... | /lib/calculate_coords.R | no_license | devbin/vidivisus | R | false | false | 762 | r | getXSkip = function(x, pastrounds)
{
interval = x[['treatment_interval']]
data_pastrounds = as.numeric(x[['pastrounds']])
data_futurerounds = as.numeric(x[['futurerounds']])
skip = 0
if((data_pastrounds == pastrounds) && (data_futurerounds > 0)){
if(interval == "Future annual treatment"){
skip = ... |
#' Wrapper function for conditional independence tests.
#'
#' @description Tests the null hypothesis that Y and E are independent given X.
#'
#' @param Y An n-dimensional vector or a matrix or dataframe with n rows and p columns.
#' @param E An n-dimensional vector or a matrix or dataframe with n rows and p columns.
#'... | /CondIndTests/R/condIndTest.R | no_license | christinaheinze/nonlinearICP-and-CondIndTests | R | false | false | 4,752 | r | #' Wrapper function for conditional independence tests.
#'
#' @description Tests the null hypothesis that Y and E are independent given X.
#'
#' @param Y An n-dimensional vector or a matrix or dataframe with n rows and p columns.
#' @param E An n-dimensional vector or a matrix or dataframe with n rows and p columns.
#'... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/occMod.R
\name{occMod}
\alias{occMod}
\title{Run occupancy models in \code{rapidPop}.}
\usage{
occMod(
input_file = NULL,
input_file_type = ".txt",
nm1 = "day01",
nmF = "day12",
parameter = FALSE,
nm_parameter,
digits = 3,
shi... | /man/occMod.Rd | no_license | mikeyEcology/rapidPop | R | false | true | 1,620 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/occMod.R
\name{occMod}
\alias{occMod}
\title{Run occupancy models in \code{rapidPop}.}
\usage{
occMod(
input_file = NULL,
input_file_type = ".txt",
nm1 = "day01",
nmF = "day12",
parameter = FALSE,
nm_parameter,
digits = 3,
shi... |
setwd('~/Projects/NKIProjects/LNCGH/DNAcopyData/')
files <- dir(pattern='txt')
tempData <- read.delim(files[1], stringsAsFactors=FALSE)
probes <- tempData$PROBE_ID
dataList <- vector(mode='list', length=length(files))
names(dataList) <- unlist(lapply(strsplit(
files, split='_'), function (x) {return(x[1])}))
for (... | /mariekeNL_produceGEOdata.R | no_license | ChrisKlijn/LNCGH | R | false | false | 592 | r | setwd('~/Projects/NKIProjects/LNCGH/DNAcopyData/')
files <- dir(pattern='txt')
tempData <- read.delim(files[1], stringsAsFactors=FALSE)
probes <- tempData$PROBE_ID
dataList <- vector(mode='list', length=length(files))
names(dataList) <- unlist(lapply(strsplit(
files, split='_'), function (x) {return(x[1])}))
for (... |
library(ggplot2)
N <- 20
df1 <- data.frame(x=sort(rnorm(N)),y=sort(rnorm(N)))
df2 <- data.frame(x=df1$x+0.1*rnorm(N),y=df1$y+0.1*rnorm(N))
p1 <- ggplot(df1,aes(x,y,color=x+y))+
geom_line(size=1)+
geom_point(shape=16,size=5)+
guides(color=guide_colorbar(title = "Point\nLine"))+
labs(title = "所有图层共享数据源和... | /可视化之美/1.R | no_license | MEP218713/R-study | R | false | false | 1,044 | r | library(ggplot2)
N <- 20
df1 <- data.frame(x=sort(rnorm(N)),y=sort(rnorm(N)))
df2 <- data.frame(x=df1$x+0.1*rnorm(N),y=df1$y+0.1*rnorm(N))
p1 <- ggplot(df1,aes(x,y,color=x+y))+
geom_line(size=1)+
geom_point(shape=16,size=5)+
guides(color=guide_colorbar(title = "Point\nLine"))+
labs(title = "所有图层共享数据源和... |
library(Hmisc)
library(quanteda)
library(tm)
library(NLP)
library(openNLP)
library(jiebaR)
library(reshape)
library(igraph)
library(statnet)
library(dils)
library(sna)
all_code <- read.csv("D:/論文/上市櫃電子工業代碼.csv")
all_code <- all_code$Code
all_code <- c(all_code,"3291","4962","3411","3474","3061","8172","6416","5466")
di... | /SNA.R | no_license | bruce820614/Thesis | R | false | false | 3,390 | r | library(Hmisc)
library(quanteda)
library(tm)
library(NLP)
library(openNLP)
library(jiebaR)
library(reshape)
library(igraph)
library(statnet)
library(dils)
library(sna)
all_code <- read.csv("D:/論文/上市櫃電子工業代碼.csv")
all_code <- all_code$Code
all_code <- c(all_code,"3291","4962","3411","3474","3061","8172","6416","5466")
di... |
library(shiny)
library(shinydashboard)
library(tidyverse)
library(lubridate)
library(incidence)
#library(ggiraph)
library(echarts4r)
library(earlyR)
library(epitrix)
library(shinyjs)
library(shinyWidgets)
library(projections)
library(EpiEstim)
# get data
jhu_url <- paste("https://raw.githubusercontent.com/CSSEGISandDa... | /app/global.R | no_license | rickyking/covid19-R0-minitor | R | false | false | 2,217 | r | library(shiny)
library(shinydashboard)
library(tidyverse)
library(lubridate)
library(incidence)
#library(ggiraph)
library(echarts4r)
library(earlyR)
library(epitrix)
library(shinyjs)
library(shinyWidgets)
library(projections)
library(EpiEstim)
# get data
jhu_url <- paste("https://raw.githubusercontent.com/CSSEGISandDa... |
#' Calculate jaccard statistics on two sets of intervals.
#'
#' @param x tbl of intervals
#' @param y tbl of intervals
#' @param strand group intervals by strand
#'
#' @return \code{data_frame} with the following columns:
#' \itemize{
#' \item{\code{len_i}}{ length of the intersection}
#' \item{\code{len_u}}{ ... | /R/bed_jaccard.r | no_license | dpastling/valr | R | false | false | 1,422 | r | #' Calculate jaccard statistics on two sets of intervals.
#'
#' @param x tbl of intervals
#' @param y tbl of intervals
#' @param strand group intervals by strand
#'
#' @return \code{data_frame} with the following columns:
#' \itemize{
#' \item{\code{len_i}}{ length of the intersection}
#' \item{\code{len_u}}{ ... |
df2m <- function(x)
{
if(!is.null(x)) {
xattr <- attributes(x)
nxa <- names(xattr)
x$intnr <- x$paramnr <- x$varname <- NULL
cn <- colnames(x)
x <- as.matrix(x)
rownames(x) <- 1L:nrow(x)
colnames(x) <- rep(cn, length.out = ncol(x))
for(k in 1L:length(nxa))
if(all(nxa[k] != c("di... | /R/df2m.R | no_license | cran/R2BayesX | R | false | false | 439 | r | df2m <- function(x)
{
if(!is.null(x)) {
xattr <- attributes(x)
nxa <- names(xattr)
x$intnr <- x$paramnr <- x$varname <- NULL
cn <- colnames(x)
x <- as.matrix(x)
rownames(x) <- 1L:nrow(x)
colnames(x) <- rep(cn, length.out = ncol(x))
for(k in 1L:length(nxa))
if(all(nxa[k] != c("di... |
#' Count the unique values in a tidy data frame.
#' @import dplyr
#' @export
count_unique <- function(frame, id_col) {
frame[[id_col]] %>% na.omit() %>% unique() %>% length()
}
| /wordsintransition/R/reporters.R | no_license | lupyanlab/words-in-transition | R | false | false | 180 | r |
#' Count the unique values in a tidy data frame.
#' @import dplyr
#' @export
count_unique <- function(frame, id_col) {
frame[[id_col]] %>% na.omit() %>% unique() %>% length()
}
|
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
# Next, we download packages that H2O depends on.
if (! ("methods" %in% rownames(installed.packages()))) { install.packages("methods") }
if (! ("statmod" %in% rownames(insta... | /titanic_3.R | no_license | ritchie-xl/titanic_ml_python_h2o | R | false | false | 2,932 | r | if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
# Next, we download packages that H2O depends on.
if (! ("methods" %in% rownames(installed.packages()))) { install.packages("methods") }
if (! ("statmod" %in% rownames(insta... |
#PJTN feature developmnet
library(glookoGEO)
#Exploratory analysis for one months worth of data
start <- '2016-01-01 00:00:00'
end <- '2016-01-01 23:59:59'
klystron <- 'li22_31'
#PJTN
query <- paste(list("select * from test.pjtn where timestamp >= '", start, "' and timestamp <= '", end, "' and klystron = ", klystro... | /exploratory_analysis/pjtn_exploration.R | no_license | vikdad1/stanford_linear_accelerator | R | false | false | 4,563 | r | #PJTN feature developmnet
library(glookoGEO)
#Exploratory analysis for one months worth of data
start <- '2016-01-01 00:00:00'
end <- '2016-01-01 23:59:59'
klystron <- 'li22_31'
#PJTN
query <- paste(list("select * from test.pjtn where timestamp >= '", start, "' and timestamp <= '", end, "' and klystron = ", klystro... |
source("init.R")
# input <- list(ni=30, nrow=5, near=3, icon="fir", path=2, colle1="green", colle2="lightgreen", colre1="green", colre2="darkgreen", iex = 1, ip = 1, seed = 12345, col="black")
server <- function(input, output) {
output$pdfPlot <- renderPlot({
Forest(ni = input$ni,
nrow = in... | /inst/shiny-examples/forestApp/server.R | no_license | vonthein/illustrator | R | false | false | 1,238 | r |
source("init.R")
# input <- list(ni=30, nrow=5, near=3, icon="fir", path=2, colle1="green", colle2="lightgreen", colre1="green", colre2="darkgreen", iex = 1, ip = 1, seed = 12345, col="black")
server <- function(input, output) {
output$pdfPlot <- renderPlot({
Forest(ni = input$ni,
nrow = in... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polarity.R
\name{print.polarity_score}
\alias{print.polarity_score}
\title{Prints a polarity_score Object}
\usage{
\method{print}{polarity_score}(x, digits = 3, ...)
}
\arguments{
\item{x}{The polarity_score object.}
\item{digits}{The number... | /man/print.polarity_score.Rd | no_license | hoodaly/qdap | R | false | true | 450 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polarity.R
\name{print.polarity_score}
\alias{print.polarity_score}
\title{Prints a polarity_score Object}
\usage{
\method{print}{polarity_score}(x, digits = 3, ...)
}
\arguments{
\item{x}{The polarity_score object.}
\item{digits}{The number... |
## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix created a list of functions including setting inverse and getting inverse
## Passing a vector of values into makeCacheMatrix will cache the function with those values
makeCacheMatrix <- function(x = matrix()) {
... | /cachematrix.R | no_license | aakritisvyas/ProgrammingAssignment2 | R | false | false | 1,410 | r | ## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix created a list of functions including setting inverse and getting inverse
## Passing a vector of values into makeCacheMatrix will cache the function with those values
makeCacheMatrix <- function(x = matrix()) {
... |
#reading data into R
elet<- read.table("/Users/amir/desktop/household_power_consumption.txt", sep=";",nrows= 2075260, header=TRUE, quote= "", strip.white=TRUE, stringsAsFactors = FALSE, na.strings= "?")
# Subsetting the full data to obtain the data related to two days:
sub<- subset(elet, (elet$Date == "1/2/2007" | el... | /Plot1.R | no_license | syedamiralisha/ExData_Plotting1 | R | false | false | 544 | r | #reading data into R
elet<- read.table("/Users/amir/desktop/household_power_consumption.txt", sep=";",nrows= 2075260, header=TRUE, quote= "", strip.white=TRUE, stringsAsFactors = FALSE, na.strings= "?")
# Subsetting the full data to obtain the data related to two days:
sub<- subset(elet, (elet$Date == "1/2/2007" | el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.