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 |
|---|---|---|---|---|---|---|---|---|---|
#' Empirical Orthogonal Function
#'
#' Computes Singular Value Decomposition (also known as Principal Components
#' Analysis or Empirical Orthogonal Functions).
#'
#' @param data a data.frame
#' @param formula a formula passed to \code{\link[data.table]{dcast}} to build
#' the matrix that will be used in the SVD decomp... | /R/EOF.R | no_license | R-forks-to-learn/metR | R | false | false | 5,165 | r | #' Empirical Orthogonal Function
#'
#' Computes Singular Value Decomposition (also known as Principal Components
#' Analysis or Empirical Orthogonal Functions).
#'
#' @param data a data.frame
#' @param formula a formula passed to \code{\link[data.table]{dcast}} to build
#' the matrix that will be used in the SVD decomp... |
library(StackLimit)
c = stackLimit()
stackLimit(c[1]*2)
stackLimit()
| /tests/stack.R | no_license | duncantl/StackLimit | R | false | false | 70 | r | library(StackLimit)
c = stackLimit()
stackLimit(c[1]*2)
stackLimit()
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-summarizeMolecularProfiles.R
\name{summarizeMolecularProfiles,PharmacoSet-method}
\alias{summarizeMolecularProfiles,PharmacoSet-method}
\title{Takes molecular data from a PharmacoSet, and summarises them
into one entry per drug}
\usag... | /man/summarizeMolecularProfiles-PharmacoSet-method.Rd | no_license | FuChunjin/PharmacoGx | R | false | true | 2,775 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-summarizeMolecularProfiles.R
\name{summarizeMolecularProfiles,PharmacoSet-method}
\alias{summarizeMolecularProfiles,PharmacoSet-method}
\title{Takes molecular data from a PharmacoSet, and summarises them
into one entry per drug}
\usag... |
# Some Phylogenetic Comparative Methods: PCMs
## packages: nlme, ape, geiger, phytools, geomorph
library(nlme) # Contains GLS
library(ape) # Many phylogenetics-related analyses (see Paradis, Analysis of Phylogenetics and Evolution with R)
library(geiger) # Many evolutionary analyses
library(phytools)
library(geom... | /Lab/Scripts/12-PhylogeneticComparativeMethods.r | no_license | morganmackert/EEOB590C-DA | R | false | false | 4,647 | r | # Some Phylogenetic Comparative Methods: PCMs
## packages: nlme, ape, geiger, phytools, geomorph
library(nlme) # Contains GLS
library(ape) # Many phylogenetics-related analyses (see Paradis, Analysis of Phylogenetics and Evolution with R)
library(geiger) # Many evolutionary analyses
library(phytools)
library(geom... |
library(pkr)
### Name: sNCA
### Title: Simplest NCA
### Aliases: sNCA
### Keywords: Output Form
### ** Examples
# For one subject
x = Theoph[Theoph$Subject=="1","Time"]
y = Theoph[Theoph$Subject=="1","conc"]
sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h")
sNCA(x, y, dose=320, concUnit="mg/L", re... | /data/genthat_extracted_code/pkr/examples/sNCA.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,280 | r | library(pkr)
### Name: sNCA
### Title: Simplest NCA
### Aliases: sNCA
### Keywords: Output Form
### ** Examples
# For one subject
x = Theoph[Theoph$Subject=="1","Time"]
y = Theoph[Theoph$Subject=="1","conc"]
sNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h")
sNCA(x, y, dose=320, concUnit="mg/L", re... |
#source("C:/Users/lisanjie2/Documents/1_R/2_Fx_FUNCTIONS/Fx_over_disp.R")
########################################
### Bolker's overdispersion function #c
# http://glmm.wikidot.com/faq
# I think this is designed for POISSOn data, not sure...
overdisp_fun <- function(model) {
## number of variance parameters in
... | /over_disp.R | no_license | brouwern/FUNCTIONS | R | false | false | 1,454 | r |
#source("C:/Users/lisanjie2/Documents/1_R/2_Fx_FUNCTIONS/Fx_over_disp.R")
########################################
### Bolker's overdispersion function #c
# http://glmm.wikidot.com/faq
# I think this is designed for POISSOn data, not sure...
overdisp_fun <- function(model) {
## number of variance parameters in
... |
sp_score<-read.csv("D:\\GIS Projects\\StateParks\\TiffsforR\\State_Park_Scores_0510411.csv",sep=",")
sp_score<-read.csv("D:\\GIS Projects\\StateParks\\BIG_State_Parks_Table.csv",sep=",")
sp_score<-sp_score[ which(sp_score$Include=='Y'),]
sp_score<-read.csv("D:\\GIS Projects\\StateParks\\BIG_State_Parks_Table_Y... | /r_script_State_Parks_Plots.R | no_license | NYNatHeritage/OPRHP_Biodiversity_Index | R | false | false | 15,474 | r | sp_score<-read.csv("D:\\GIS Projects\\StateParks\\TiffsforR\\State_Park_Scores_0510411.csv",sep=",")
sp_score<-read.csv("D:\\GIS Projects\\StateParks\\BIG_State_Parks_Table.csv",sep=",")
sp_score<-sp_score[ which(sp_score$Include=='Y'),]
sp_score<-read.csv("D:\\GIS Projects\\StateParks\\BIG_State_Parks_Table_Y... |
# 2017.8.9 BY Juan Zhang
rm(list=ls())
options(stringsAsFactors = F)
## 加载差异分析结果
lnames <- load("../Analysis/deg_analysis/Step03-limma_voom_nrDEG.Rdata")
lnames
# 提取差异表达的gene
DEG <- DEG_limma_voom$Geneid[which(DEG_limma_voom$regulated!="normal")]
# 将symbol转换成gene id
library(org.Hs.eg.db)
keytypes(or... | /step06-hyperDistrubition.R | no_license | luohaohao/hello-world | R | false | false | 2,176 | r | # 2017.8.9 BY Juan Zhang
rm(list=ls())
options(stringsAsFactors = F)
## 加载差异分析结果
lnames <- load("../Analysis/deg_analysis/Step03-limma_voom_nrDEG.Rdata")
lnames
# 提取差异表达的gene
DEG <- DEG_limma_voom$Geneid[which(DEG_limma_voom$regulated!="normal")]
# 将symbol转换成gene id
library(org.Hs.eg.db)
keytypes(or... |
#문제1
grade <- sample(1:6,1)
grade <- paste(grade,'학년' ,sep='')
grade
result<- switch(EXPR = grade ,"1학년"=,"2학년"=,'3학년'='저학년입니다.',
'고학년입니다.')
cat( grade,'은 ', result ,sep='')
#문제2
choice <- sample(1:5,1)
result<-if(choice ==1){ 300+50
}else if(choice ==2){ 300-50
}else if(choice ==4) { 300/50
}else if(... | /R_training/실습제출/배윤성/10월 28일 까지/lab_05.R | no_license | BaeYS-marketing/R | R | false | false | 1,013 | r |
#문제1
grade <- sample(1:6,1)
grade <- paste(grade,'학년' ,sep='')
grade
result<- switch(EXPR = grade ,"1학년"=,"2학년"=,'3학년'='저학년입니다.',
'고학년입니다.')
cat( grade,'은 ', result ,sep='')
#문제2
choice <- sample(1:5,1)
result<-if(choice ==1){ 300+50
}else if(choice ==2){ 300-50
}else if(choice ==4) { 300/50
}else if(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/psy.phd.R
\name{d_ci95}
\alias{d_ci95}
\title{95% confidence interval for Cohen's d (Rosnow & Rosenthal, 2009)}
\usage{
d_ci95(d, n1, n2)
}
\arguments{
\item{d}{Cohen's d}
\item{n1}{n in group1}
\item{n2}{n in group2}
}
\value{
numeric
}
\d... | /man/d_ci95.Rd | permissive | paulsharpeY/psy.phd | R | false | true | 476 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/psy.phd.R
\name{d_ci95}
\alias{d_ci95}
\title{95% confidence interval for Cohen's d (Rosnow & Rosenthal, 2009)}
\usage{
d_ci95(d, n1, n2)
}
\arguments{
\item{d}{Cohen's d}
\item{n1}{n in group1}
\item{n2}{n in group2}
}
\value{
numeric
}
\d... |
library(RMySQL)
library(zipcode)
library(dplyr)
library(ggmap)
keys<-fromJSON("../keys.json")$street_data
con <- dbConnect(RMySQL::MySQL(),
host = keys$host,
dbname = keys$dbname,
user = keys$id,
password = keys$pw)
spooky <- read.csv("halloween_wor... | /dark_alleys.R | no_license | joeramirez/street_data | R | false | false | 2,212 | r | library(RMySQL)
library(zipcode)
library(dplyr)
library(ggmap)
keys<-fromJSON("../keys.json")$street_data
con <- dbConnect(RMySQL::MySQL(),
host = keys$host,
dbname = keys$dbname,
user = keys$id,
password = keys$pw)
spooky <- read.csv("halloween_wor... |
\name{bedr.join.region}
\alias{bedr.join.region}
\title{
join two region objects using a left outer join
}
\description{
join two region objects using a left outer join
}
\usage{
bedr.join.region(
x,
y,
fraction.overlap = 1/1e9,
reciporical = FALSE,
report.n.overlap = FALSE,
check.zero.based = TRUE,
check.chr ... | /man/bedr.join.region.Rd | no_license | cran/bedr | R | false | false | 1,391 | rd | \name{bedr.join.region}
\alias{bedr.join.region}
\title{
join two region objects using a left outer join
}
\description{
join two region objects using a left outer join
}
\usage{
bedr.join.region(
x,
y,
fraction.overlap = 1/1e9,
reciporical = FALSE,
report.n.overlap = FALSE,
check.zero.based = TRUE,
check.chr ... |
#' Fast optimization of Gaussian Mixture Copula Models
#'
#' Gaussian mixture copula models (GMCM) are a flexible class of statistical
#' models which can be used for unsupervised clustering, meta analysis, and
#' many other things. In meta analysis, GMCMs can be used to
#' quantify and identify which features which ha... | /R/GMCM-package.R | no_license | Guillermogsjc/GMCM | R | false | false | 9,010 | r | #' Fast optimization of Gaussian Mixture Copula Models
#'
#' Gaussian mixture copula models (GMCM) are a flexible class of statistical
#' models which can be used for unsupervised clustering, meta analysis, and
#' many other things. In meta analysis, GMCMs can be used to
#' quantify and identify which features which ha... |
library(shiny)
#
# Idea and original code by Pierre Chretien
# Small updates by Michael Kapler
# More mods by iyermobile
#
# Shiny app simulating cash-flow scenarios during retirement
shinyServer(function(input, output) {
projectRetirement <- reactive({
yearsObserving = input$n.obs # what period of time do we wa... | /period2retire/server.r | no_license | iyermobile/period2retire | R | false | false | 4,990 | r | library(shiny)
#
# Idea and original code by Pierre Chretien
# Small updates by Michael Kapler
# More mods by iyermobile
#
# Shiny app simulating cash-flow scenarios during retirement
shinyServer(function(input, output) {
projectRetirement <- reactive({
yearsObserving = input$n.obs # what period of time do we wa... |
# Author: lily-tian
# Date: 20 Aug 2016
# Word frequency writer
# reads in the raw data
words <- read.delim("data/all_words.csv", header = FALSE)
vars <- cbind("word", "year", "freq", "freqs")
colnames(words) <- vars
# make cap-insensitive and aggregates across all time periods
words$word <- toupper(words$word)
words... | /wordfreq_writer.R | no_license | lily-tian/words | R | false | false | 669 | r | # Author: lily-tian
# Date: 20 Aug 2016
# Word frequency writer
# reads in the raw data
words <- read.delim("data/all_words.csv", header = FALSE)
vars <- cbind("word", "year", "freq", "freqs")
colnames(words) <- vars
# make cap-insensitive and aggregates across all time periods
words$word <- toupper(words$word)
words... |
library(dplyr)
library(ggplot2)
# Begin Exclude Linting
library(gridExtra)
# End Exclude Linting
####################################################
# #
# EXPORTED FUNCTIONS (A-Z #
# #
###########... | /R/question-1a-002-charts-latitude.R | no_license | s1888637/weathr | R | false | false | 2,226 | r | library(dplyr)
library(ggplot2)
# Begin Exclude Linting
library(gridExtra)
# End Exclude Linting
####################################################
# #
# EXPORTED FUNCTIONS (A-Z #
# #
###########... |
#'@name debiasedmcmc-package
#'@aliases debiasedmcmc
#'@docType package
#'@title debiasedmcmc
#'@author Pierre E. Jacob <pierre.jacob.work@@gmail.com>, John O'Leary
#'@description Unbiased MCMC estimators with couplings
#'@details This package contains scripts to reproduce the figures of the
#' paper "Unbiased Markov c... | /R/debiasedmcmc-package.R | no_license | dennisprangle/debiasedmcmc | R | false | false | 485 | r | #'@name debiasedmcmc-package
#'@aliases debiasedmcmc
#'@docType package
#'@title debiasedmcmc
#'@author Pierre E. Jacob <pierre.jacob.work@@gmail.com>, John O'Leary
#'@description Unbiased MCMC estimators with couplings
#'@details This package contains scripts to reproduce the figures of the
#' paper "Unbiased Markov c... |
TrainSuperMDS <-
function(d=NULL, y, alpha=.5, S=2, x=NULL, nstarts=5, silent=FALSE){
outputs <- list()
crits <- rep(NA, nstarts)
if(!silent) cat("Starting iter 1", fill=TRUE)
outputs[[1]] <- TrainSuperMDSOnce(d=d,y=y,alpha=alpha,S=S,x=x,z=NULL)
crits[1] <- min(outputs[[1]]$crits)
if(nstarts>1){
for(ite... | /R/TrainSuperMDS.R | no_license | cran/superMDS | R | false | false | 676 | r | TrainSuperMDS <-
function(d=NULL, y, alpha=.5, S=2, x=NULL, nstarts=5, silent=FALSE){
outputs <- list()
crits <- rep(NA, nstarts)
if(!silent) cat("Starting iter 1", fill=TRUE)
outputs[[1]] <- TrainSuperMDSOnce(d=d,y=y,alpha=alpha,S=S,x=x,z=NULL)
crits[1] <- min(outputs[[1]]$crits)
if(nstarts>1){
for(ite... |
# ## import libraries
library(shiny)
library(ggplot2)
library(dplyr)
library(DT)
library(stringr)
library(shinyBS)
library(shinyjs)
library(ggthemes)
## import functions
source('./functions/helper.R')
source('./functions/plot.R')
source('./functions/aggregate.R')
## import global constants
source('./global_constants... | /inst/raptR/server.R | permissive | newey/raptR | R | false | false | 1,650 | r | # ## import libraries
library(shiny)
library(ggplot2)
library(dplyr)
library(DT)
library(stringr)
library(shinyBS)
library(shinyjs)
library(ggthemes)
## import functions
source('./functions/helper.R')
source('./functions/plot.R')
source('./functions/aggregate.R')
## import global constants
source('./global_constants... |
hexSticker::sticker(
subplot = "ImmPortR/icons8-cargo-ship-100.png",
package = "ImmPortR", p_family = "serif", p_y = 1.35,
h_fill = "#222222", h_color = "#53309E", h_size = 1.4,
s_x = 1, s_y = 0.75, s_width = 0.35, s_height = 0.35,
filename = "ImmPortR/logo.png"
)
# hexSticker::sticker(
# subplot = "https:... | /ImmPortR/logo_gen.R | permissive | RGLab/sticker | R | false | false | 587 | r | hexSticker::sticker(
subplot = "ImmPortR/icons8-cargo-ship-100.png",
package = "ImmPortR", p_family = "serif", p_y = 1.35,
h_fill = "#222222", h_color = "#53309E", h_size = 1.4,
s_x = 1, s_y = 0.75, s_width = 0.35, s_height = 0.35,
filename = "ImmPortR/logo.png"
)
# hexSticker::sticker(
# subplot = "https:... |
#SETTING WORKING DIRECTORY
setwd("~/coursera")
#READING THE WHOLE DATA INTO R
HPC = read.table("household_power_consumption.txt",
header = TRUE, sep = ";", na.strings = "?")
#SUBSETTING THE DATA
DataOne = subset(HPC, HPC$Date == "1/2/2007")
DataTwo = subset(HPC, HPC$Date == "2/2/2007")
NewData = rbind(DataOne, Dat... | /plot1.R | no_license | WisdomAmet/ExData_Plotting1 | R | false | false | 614 | r | #SETTING WORKING DIRECTORY
setwd("~/coursera")
#READING THE WHOLE DATA INTO R
HPC = read.table("household_power_consumption.txt",
header = TRUE, sep = ";", na.strings = "?")
#SUBSETTING THE DATA
DataOne = subset(HPC, HPC$Date == "1/2/2007")
DataTwo = subset(HPC, HPC$Date == "2/2/2007")
NewData = rbind(DataOne, Dat... |
### ENet Molecular Feature only
###################################################
### step 1: loadLibraries
###################################################
library(predictiveModeling)
library(BCC)
library(survival)
library(survcomp)
library(MASS)
library(rms)
synapseLogin("in.sock.jang@sagebase.org","tjsDUD@")
... | /survival_analysis/IterCV_Gaurav/ENet_M_submission.R | no_license | insockjang/DrugResponse | R | false | false | 5,789 | r | ### ENet Molecular Feature only
###################################################
### step 1: loadLibraries
###################################################
library(predictiveModeling)
library(BCC)
library(survival)
library(survcomp)
library(MASS)
library(rms)
synapseLogin("in.sock.jang@sagebase.org","tjsDUD@")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wav2db.R
\name{wav2db}
\alias{wav2db}
\title{Extract pulses and store them in a soundcluster database}
\usage{
wav2db(db, path, recursive = TRUE, make, model, serial = NA_character_,
te_factor = 1, channel = c("left", "right"), max_length =... | /man/wav2db.Rd | no_license | ThierryO/soundcluster | R | false | true | 2,037 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wav2db.R
\name{wav2db}
\alias{wav2db}
\title{Extract pulses and store them in a soundcluster database}
\usage{
wav2db(db, path, recursive = TRUE, make, model, serial = NA_character_,
te_factor = 1, channel = c("left", "right"), max_length =... |
# Bagging is a randomized model, so let's set a seed (123) for reproducibility
set.seed(___)
# Train a bagged model
credit_model <- bagging(formula = default ~ .,
data = ___,
coob = TRUE)
# Print the model
print(credit_model)
| /exercises/exc_03_03.R | permissive | xiangao/tree-based-models-in-r | R | false | false | 287 | r | # Bagging is a randomized model, so let's set a seed (123) for reproducibility
set.seed(___)
# Train a bagged model
credit_model <- bagging(formula = default ~ .,
data = ___,
coob = TRUE)
# Print the model
print(credit_model)
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% ReseqCrosstalkCalibration.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{ReseqCro... | /man/ReseqCrosstalkCalibration.Rd | no_license | microarray/aroma.affymetrix | R | false | false | 3,359 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% ReseqCrosstalkCalibration.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{ReseqCro... |
library(ALSM)
### Name: SBCp
### Title: Calculate SBC
### Aliases: SBCp
### ** Examples
##################use data Surgical Unit, page 360
SBCp(lm(lny~x4,SurgicalUnit))
| /data/genthat_extracted_code/ALSM/examples/9_SBCp.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 178 | r | library(ALSM)
### Name: SBCp
### Title: Calculate SBC
### Aliases: SBCp
### ** Examples
##################use data Surgical Unit, page 360
SBCp(lm(lny~x4,SurgicalUnit))
|
##########################################################################################################################################
#(주의) -> 순차적으로 코드를 실행하는 것을 권함!
#에러 발생 시 github Finance/R-Finance-Programming 경로에 issue를 남기면 확인
############################################################################... | /R-Finance-Programming/ch02_Data_manipulation/01_class_data_structure.R | no_license | Fintecuriosity11/Finance | R | false | false | 2,571 | r | ##########################################################################################################################################
#(주의) -> 순차적으로 코드를 실행하는 것을 권함!
#에러 발생 시 github Finance/R-Finance-Programming 경로에 issue를 남기면 확인
############################################################################... |
# Compute the distance between two points (default: Euclidean)
# type = {"Euclidian", "Manhattan")
# YOU SHOULD ALSO VERIFY THE INPUT GIVEN BY THE USER TO THE FUNCTION
myDistance <- function(x, y, type="Euclidian") {
if ((type=="Manhattan") | (type=="L1")) { # or L1-norm
dist <- sum( abs(x - y) )
}
else { ... | /Ex6/Commands ex.6 and 7.R | no_license | SimuJenni/Statistical-Learning-with-R | R | false | false | 2,797 | r | # Compute the distance between two points (default: Euclidean)
# type = {"Euclidian", "Manhattan")
# YOU SHOULD ALSO VERIFY THE INPUT GIVEN BY THE USER TO THE FUNCTION
myDistance <- function(x, y, type="Euclidian") {
if ((type=="Manhattan") | (type=="L1")) { # or L1-norm
dist <- sum( abs(x - y) )
}
else { ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scfind-package.R
\docType{package}
\name{scfind}
\alias{scfind}
\alias{scfind-package}
\title{Minimal Rcpp Module Example}
\description{
scfind
}
\details{
A minimal example of using Rcpp modules in an Rcpp package
}
\author{
Nikolaos Patikas... | /man/scfind.Rd | permissive | thjimmylee/scfind | R | false | true | 323 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scfind-package.R
\docType{package}
\name{scfind}
\alias{scfind}
\alias{scfind-package}
\title{Minimal Rcpp Module Example}
\description{
scfind
}
\details{
A minimal example of using Rcpp modules in an Rcpp package
}
\author{
Nikolaos Patikas... |
#Set wd
#Copy folder path to clipboard
setwd(readClipboard())
## Import SQL library to subset on the read in
library(sqldf)
household_data <- read.csv.sql("household_power_consumption.txt", sep = ";", header = TRUE, sql = "select * from file where Date in ('2/1/2007','2/2/2007')")
###Clean out time data... | /plot3.R | no_license | adam-moreno/ExData_Plotting1 | R | false | false | 1,201 | r | #Set wd
#Copy folder path to clipboard
setwd(readClipboard())
## Import SQL library to subset on the read in
library(sqldf)
household_data <- read.csv.sql("household_power_consumption.txt", sep = ";", header = TRUE, sql = "select * from file where Date in ('2/1/2007','2/2/2007')")
###Clean out time data... |
description.mainpanel <- mainPanel(
fluidPage(
tags$p("Esta aplicación web tiene por objeto la visualización de los datos públicos obtenidos en la ",
tags$a(href="http://www.gobiernodecanarias.org/istac/temas_estadisticos/sectorservicios/hosteleriayturismo/demanda/C00028A.html",
... | /description_elements.R | no_license | jmcartiles/canary_islands_tourism_dashboard | R | false | false | 1,549 | r |
description.mainpanel <- mainPanel(
fluidPage(
tags$p("Esta aplicación web tiene por objeto la visualización de los datos públicos obtenidos en la ",
tags$a(href="http://www.gobiernodecanarias.org/istac/temas_estadisticos/sectorservicios/hosteleriayturismo/demanda/C00028A.html",
... |
mlb <- read.csv(file.choose(), header = TRUE)
attach(mlb)
winpct_HR <- lm(WinPct ~ HR)
summary(winpct_HR)
winpct_Doubles <- lm(WinPct ~ Doubles)
summary(winpct_Doubles)
winpct_hitsallowed <- lm(WinPct ~ HitsAllowed)
summary(winpct_hitsallowed)
winpct_strikeouts <- lm(WinPct ~ StrikeOuts)
summary(winpct_strikeouts)
winp... | /problemSet2.R | no_license | viren-velacheri/Statistics-Programs | R | false | false | 1,569 | r | mlb <- read.csv(file.choose(), header = TRUE)
attach(mlb)
winpct_HR <- lm(WinPct ~ HR)
summary(winpct_HR)
winpct_Doubles <- lm(WinPct ~ Doubles)
summary(winpct_Doubles)
winpct_hitsallowed <- lm(WinPct ~ HitsAllowed)
summary(winpct_hitsallowed)
winpct_strikeouts <- lm(WinPct ~ StrikeOuts)
summary(winpct_strikeouts)
winp... |
context("pca")
sc <- testthat_spark_connection()
mat <- data_frame(
V1 = c(0, 2, 4),
V2 = c(1, 0, 0),
V3 = c(0, 3, 0),
V4 = c(7, 4, 6),
V5 = c(0, 5, 7))
test_that("ml_pca() agrees with Scala result", {
test_requires("dplyr")
# import org.apache.spark.ml.feature.PCA
# import org.apache.spark.ml.linal... | /tests/testthat/test-ml-pca.R | permissive | leosouzadias/sparklyr | R | false | false | 2,200 | r | context("pca")
sc <- testthat_spark_connection()
mat <- data_frame(
V1 = c(0, 2, 4),
V2 = c(1, 0, 0),
V3 = c(0, 3, 0),
V4 = c(7, 4, 6),
V5 = c(0, 5, 7))
test_that("ml_pca() agrees with Scala result", {
test_requires("dplyr")
# import org.apache.spark.ml.feature.PCA
# import org.apache.spark.ml.linal... |
library(??ncdf4)
ncin <- nc_open('~/Downloads/S5P_NRTI_L2__NO2____20181017T045013_20181017T045513_05233_01_010100_20181017T053427.nc')
ncin$var %>% str()
ncvar_get(ncin, 'vals')
| /R/Special Projects/sentinel 5.R | permissive | UrbanMatrixOne/rumo | R | false | false | 180 | r | library(??ncdf4)
ncin <- nc_open('~/Downloads/S5P_NRTI_L2__NO2____20181017T045013_20181017T045513_05233_01_010100_20181017T053427.nc')
ncin$var %>% str()
ncvar_get(ncin, 'vals')
|
## Tasks:
## ---------------------
## CLASSIFICATION
if (! "config" %in% ls()) stop("No config file given")
suppressMessages(requireNamespace("mlr3oml"))
tasks_classif = list()
if (config$type == "oml") {
e = try({
tsk("oml", task_id = as.integer(as.character(config$task)))
}, silent = TRUE)
if (! "try-er... | /src/tasks.R | no_license | schalkdaniel/cacb-benchmark | R | false | false | 756 | r | ## Tasks:
## ---------------------
## CLASSIFICATION
if (! "config" %in% ls()) stop("No config file given")
suppressMessages(requireNamespace("mlr3oml"))
tasks_classif = list()
if (config$type == "oml") {
e = try({
tsk("oml", task_id = as.integer(as.character(config$task)))
}, silent = TRUE)
if (! "try-er... |
library(sf)
library(dplyr)
library(ggplot2)
library(gganimate)
library(bcmaps)
library(rmapshaper)
library(lwgeom)
bc <- bc_bound() %>%
ms_simplify() %>%
st_make_valid()
make_sf_for_bc_animation <- function(sf, name, simplify = TRUE) {
if (simplify) sf <- ms_simplify(sf)
sf %>%
mutate(state = name) %>%
... | /2018/ateucher_sf_bcmaps/src/R/make_bc_gif.R | permissive | bcgov/bcgov-useR | R | false | false | 1,582 | r | library(sf)
library(dplyr)
library(ggplot2)
library(gganimate)
library(bcmaps)
library(rmapshaper)
library(lwgeom)
bc <- bc_bound() %>%
ms_simplify() %>%
st_make_valid()
make_sf_for_bc_animation <- function(sf, name, simplify = TRUE) {
if (simplify) sf <- ms_simplify(sf)
sf %>%
mutate(state = name) %>%
... |
extract_effects <- function(formula, ..., family = NA,
check_response = TRUE) {
# Extract fixed and random effects from a formula
#
# Args:
# formula: An object of class "formula" using mostly the syntax
# of the \code{lme4} package
# ...: Additional objects of ... | /R/validate.R | no_license | obaidpervaizgill/brms | R | false | false | 17,214 | r | extract_effects <- function(formula, ..., family = NA,
check_response = TRUE) {
# Extract fixed and random effects from a formula
#
# Args:
# formula: An object of class "formula" using mostly the syntax
# of the \code{lme4} package
# ...: Additional objects of ... |
#' Plot a series forecast distributions of dressed ensembles
#'
#' @param dressed.ens An object of class `dressed.ens`. See ?DressEnsemble for details.
#' @param add logical, default=FALSE. If TRUE, no new plotting device is created and everything is added to an existing device.
#' @param obs A vector of length N, d... | /R/SpecsVerification2/R/PlotDressedEns.R | no_license | sieste/SpecsVerification2 | R | false | false | 2,887 | r | #' Plot a series forecast distributions of dressed ensembles
#'
#' @param dressed.ens An object of class `dressed.ens`. See ?DressEnsemble for details.
#' @param add logical, default=FALSE. If TRUE, no new plotting device is created and everything is added to an existing device.
#' @param obs A vector of length N, d... |
# - - - - - - - - - - EXPLORATIVE DATA ANALYSIS - PARTNER EDUCATION - - - - - - - - - - #
#### load the dataset ####
work <- read.csv('Data_Cleaning/data_work.csv', header = T)
# Focus on south Europe
work <- work[work$rgn == 'South Europe', ]
work$rgn <- NULL
# Focus on people with a partner.working
work <- work[w... | /Explorative_Data_Analysis/EDA_SE_partner_education.R | no_license | Gilda95/Intersectionality-Bayesian-Analysis | R | false | false | 9,803 | r | # - - - - - - - - - - EXPLORATIVE DATA ANALYSIS - PARTNER EDUCATION - - - - - - - - - - #
#### load the dataset ####
work <- read.csv('Data_Cleaning/data_work.csv', header = T)
# Focus on south Europe
work <- work[work$rgn == 'South Europe', ]
work$rgn <- NULL
# Focus on people with a partner.working
work <- work[w... |
#' Automatically create a ggplot for objects obtained from fit_gam()
#'
#' @description Takes an object produced by \code{fit_gam()}, and plots the fitted GAM.
#'
#' @param x fitgam object produced by \code{fit_gam}
#' @param conf_int determines whether 95\% confidence intervals will be plotted. The default is \code{co... | /R/plot_fitgam.R | no_license | emailhy/insurancerating | R | false | false | 3,523 | r | #' Automatically create a ggplot for objects obtained from fit_gam()
#'
#' @description Takes an object produced by \code{fit_gam()}, and plots the fitted GAM.
#'
#' @param x fitgam object produced by \code{fit_gam}
#' @param conf_int determines whether 95\% confidence intervals will be plotted. The default is \code{co... |
# config.R for minimal example
# character vector of soil names to show in profile plot
soils <- c('cecil', 'altavista', 'lloyd', 'wickham', 'woodbridge', 'chewacla', 'congaree')
# single series name to fetch siblings for example
siblings_of <- 'Amador' | /inst/reports/templates/minimal/config.R | no_license | ncss-tech/soilReports | R | false | false | 256 | r | # config.R for minimal example
# character vector of soil names to show in profile plot
soils <- c('cecil', 'altavista', 'lloyd', 'wickham', 'woodbridge', 'chewacla', 'congaree')
# single series name to fetch siblings for example
siblings_of <- 'Amador' |
##############################################################################
# Read data: Downloading,unzipping and reading data
##############################################################################
# Downloading
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qus... | /run_analysis.R | no_license | elwali6/Peer-graded-Assignment-Getting-and-Cleaning-Data-Course-Project | R | false | false | 5,132 | r |
##############################################################################
# Read data: Downloading,unzipping and reading data
##############################################################################
# Downloading
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qus... |
rat.lm <- lm(consumption ~ location + flavor, data = RatPoison)
anova(rat.lm)
plot(rat.lm, w=c(1, 2, 5))
gf_point(consumption ~ flavor, color = ~ location, data = RatPoison,
width = 0.15, height = 0) %>%
gf_line(stat = "summary", group = ~ location, fun.data = mean_se)
| /inst/snippet/rat01-fig.R | no_license | rpruim/fastR2 | R | false | false | 284 | r | rat.lm <- lm(consumption ~ location + flavor, data = RatPoison)
anova(rat.lm)
plot(rat.lm, w=c(1, 2, 5))
gf_point(consumption ~ flavor, color = ~ location, data = RatPoison,
width = 0.15, height = 0) %>%
gf_line(stat = "summary", group = ~ location, fun.data = mean_se)
|
library(tidyverse)
library(lubridate)
library(ggplot2)
library(plyr)
library(scales)
# Read in data that has already been filtered through full_gloss, then format dates.
dat <- read.csv("data.csv", stringsAsFactors = FALSE)
dat$DATEposted <- as.Date(dat$DATEposted)
dat <- as_tibble(dat)
# Add new categorie... | /custom_wordlist_trend_analysis.R | no_license | secondenrique/data_scripts | R | false | false | 2,446 | r | library(tidyverse)
library(lubridate)
library(ggplot2)
library(plyr)
library(scales)
# Read in data that has already been filtered through full_gloss, then format dates.
dat <- read.csv("data.csv", stringsAsFactors = FALSE)
dat$DATEposted <- as.Date(dat$DATEposted)
dat <- as_tibble(dat)
# Add new categorie... |
library(tidyverse)
library(rvest)
library(glue)
settings <- list(
teams = 12,
qbs = 1,
wrs = 2,
rbs = 2,
tes = 1,
passing_yards = 25,
passing_td = 6,
int = -2,
rushing_yards = 10,
rushing_td = 6,
reception = 1,
receiving_yards = 10,
receiving_td = 6,
return_td = 6,
two_pt = 2,
fmbl = -2... | /helper_functions.R | no_license | brianlawrence2/ffb | R | false | false | 3,871 | r | library(tidyverse)
library(rvest)
library(glue)
settings <- list(
teams = 12,
qbs = 1,
wrs = 2,
rbs = 2,
tes = 1,
passing_yards = 25,
passing_td = 6,
int = -2,
rushing_yards = 10,
rushing_td = 6,
reception = 1,
receiving_yards = 10,
receiving_td = 6,
return_td = 6,
two_pt = 2,
fmbl = -2... |
#' calcMinkowskiDistanceVotersAlts
#' Calulate distance using minkowskiDistanceSets() which is an Rcpp generated function.
#'
#' Takes a voters dataframe and an alternatives dataframe and strips out the relevant parts and feeds them to minkowskiDistanceSets() which is an Rcpp generated function.
#' @param votersCalc... | /R/calcMinkowskiDistanceVotersAlts.R | no_license | robiRagan/voteR | R | false | false | 3,303 | r | #' calcMinkowskiDistanceVotersAlts
#' Calulate distance using minkowskiDistanceSets() which is an Rcpp generated function.
#'
#' Takes a voters dataframe and an alternatives dataframe and strips out the relevant parts and feeds them to minkowskiDistanceSets() which is an Rcpp generated function.
#' @param votersCalc... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108271e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615771614-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108271e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... |
# Trump Insulting Tweets -----
library(foreign)
library(psych)
library(lsa)
trumpinsult_tweet <- read.csv(file.choose(), header = TRUE, encoding="UTF-8", stringsAsFactors=FALSE) # file.choose()
# trump_insult_tweets_new.csv
dim(trumpinsult_tweet)
head(trumpinsult_tweet)
class(trumpinsult_tweet$date)
trumpinsult... | /code/Trump_insulting_tweets.R | no_license | mic-lin/trumpinsult_tweet | R | false | false | 3,947 | r | # Trump Insulting Tweets -----
library(foreign)
library(psych)
library(lsa)
trumpinsult_tweet <- read.csv(file.choose(), header = TRUE, encoding="UTF-8", stringsAsFactors=FALSE) # file.choose()
# trump_insult_tweets_new.csv
dim(trumpinsult_tweet)
head(trumpinsult_tweet)
class(trumpinsult_tweet$date)
trumpinsult... |
## open png plotting device
png("plot2.png")
## read input data
ip <- read.table("household_power_consumption.txt",sep=";",header=TRUE,na.strings="?")
## filter out only required data
ip_filt <- subset(ip,Date == '1/2/2007' | Date == '2/2/2007')
## free up memory used by ip
ip <- NULL
## concat date and time columns
ip... | /ExData_Plotting1/plot2.R | no_license | joellieser/ExploratoryDataAnalysis | R | false | false | 641 | r | ## open png plotting device
png("plot2.png")
## read input data
ip <- read.table("household_power_consumption.txt",sep=";",header=TRUE,na.strings="?")
## filter out only required data
ip_filt <- subset(ip,Date == '1/2/2007' | Date == '2/2/2007')
## free up memory used by ip
ip <- NULL
## concat date and time columns
ip... |
library(tangram)
### Name: custom_css
### Title: Return a CSS file as a string
### Aliases: custom_css
### ** Examples
custom_css("lancet.css", "tbl1")
| /data/genthat_extracted_code/tangram/examples/custom_css.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 159 | r | library(tangram)
### Name: custom_css
### Title: Return a CSS file as a string
### Aliases: custom_css
### ** Examples
custom_css("lancet.css", "tbl1")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kpPlotCoverage.R
\name{kpPlotCoverage}
\alias{kpPlotCoverage}
\title{kpCoverage}
\usage{
kpPlotCoverage(karyoplot, data, data.panel=1, r0=NULL, r1=NULL, col="#0e87eb", ymax=NULL, ...)
}
\arguments{
\item{karyoplot}{(a \code{KaryoPlot} object)... | /man/kpPlotCoverage.Rd | no_license | YTLogos/karyoploteR | R | false | true | 3,992 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kpPlotCoverage.R
\name{kpPlotCoverage}
\alias{kpPlotCoverage}
\title{kpCoverage}
\usage{
kpPlotCoverage(karyoplot, data, data.panel=1, r0=NULL, r1=NULL, col="#0e87eb", ymax=NULL, ...)
}
\arguments{
\item{karyoplot}{(a \code{KaryoPlot} object)... |
install.packages("tidytext")
library(twitteR)
## copied from: https://gist.github.com/earino/65faaa4388193204e1c93b8eb9773c1c
library(tidyverse)
library(tidytext)
# library(broom)
#authenticate to distant service
setup_twitter_oauth(
consumer_key = Sys.getenv("TWITTER_CONSUMER_KEY"),
consumer_secret = Sys.getenv... | /motivating_example.R | no_license | tomiaJO/CEU_TEXT_MINING | R | false | false | 2,437 | r | install.packages("tidytext")
library(twitteR)
## copied from: https://gist.github.com/earino/65faaa4388193204e1c93b8eb9773c1c
library(tidyverse)
library(tidytext)
# library(broom)
#authenticate to distant service
setup_twitter_oauth(
consumer_key = Sys.getenv("TWITTER_CONSUMER_KEY"),
consumer_secret = Sys.getenv... |
########################################
# This script precomputes cross correlation coefficients based on SARIMA model
# residuals with lags up to -14
########################################
# Imports
library(dplyr)
library(forecast)
library(tidyverse)
# Get Google Trends data
dat = data.frame(keyword=character(),... | /Time Series Analysis/precompute.R | no_license | nanand7/DS-Project-2021 | R | false | false | 3,936 | r | ########################################
# This script precomputes cross correlation coefficients based on SARIMA model
# residuals with lags up to -14
########################################
# Imports
library(dplyr)
library(forecast)
library(tidyverse)
# Get Google Trends data
dat = data.frame(keyword=character(),... |
X <- rbind(x_train, x_test)
Y <- rbind(y_train, y_test)
Subject <- rbind(subject_train, subject_test)
Merged_Data <- cbind(Subject, Y, X)
TidyData <- Merged_Data %>% select(subject, code, contains("mean"), contains("std"))
TidyData$code <- activities[TidyData$code, 2]
names(TidyData)... | /run_analysis.R | no_license | mose85/jhu-datacleaned_project | R | false | false | 1,275 | r |
X <- rbind(x_train, x_test)
Y <- rbind(y_train, y_test)
Subject <- rbind(subject_train, subject_test)
Merged_Data <- cbind(Subject, Y, X)
TidyData <- Merged_Data %>% select(subject, code, contains("mean"), contains("std"))
TidyData$code <- activities[TidyData$code, 2]
names(TidyData)... |
speed_vector <- c("Fast","Slow","Slow","Fast","Ultra-fast")
factor_speed_vector <- factor(speed_vector, ordered=TRUE, levels=c("Slow","Fast","Ultra-fast"))
# Your code below
compare_them <- factor_speed_vector[2] > factor_speed_vector[5]
# Is data analyst 2 faster than data analyst 5?
compare_them
| /introduction-to-r/chapter-4-factors/Comparing ordered factors.R | no_license | oliverwreath/R_Practise | R | false | false | 301 | r | speed_vector <- c("Fast","Slow","Slow","Fast","Ultra-fast")
factor_speed_vector <- factor(speed_vector, ordered=TRUE, levels=c("Slow","Fast","Ultra-fast"))
# Your code below
compare_them <- factor_speed_vector[2] > factor_speed_vector[5]
# Is data analyst 2 faster than data analyst 5?
compare_them
|
pdf("city.pdf")
citysales<-read.csv("citysales.csv")
barplot(as.matrix(citysales[,2:4]), beside=TRUE,horiz=TRUE,
legend.text=citysales$City, args.legend=list(bty="n"),
col=brewer.pal(5,"Set1"),border="white",
xlim=c(0,100), xlab="Sales Revenue (1,000's of USD)",
main="Sales Figures")
dev.off() | /R可视化/orientation of bar.r | no_license | rogerjms/R_data_mining | R | false | false | 301 | r | pdf("city.pdf")
citysales<-read.csv("citysales.csv")
barplot(as.matrix(citysales[,2:4]), beside=TRUE,horiz=TRUE,
legend.text=citysales$City, args.legend=list(bty="n"),
col=brewer.pal(5,"Set1"),border="white",
xlim=c(0,100), xlab="Sales Revenue (1,000's of USD)",
main="Sales Figures")
dev.off() |
\name{Ridit-package}
\alias{Ridit-package}
\alias{Ridit}
\docType{package}
\title{
Ridit Analysis (An extension of the Kruskal-Wallis Test.)
}
\description{
An extension of the Kruskal-Wallis Test that allow selection of arbitrary reference group. Also provide Mean Ridit for each group. Mean Ridit of a group is... | /man/Ridit-package.Rd | no_license | cran/Ridit | R | false | false | 880 | rd | \name{Ridit-package}
\alias{Ridit-package}
\alias{Ridit}
\docType{package}
\title{
Ridit Analysis (An extension of the Kruskal-Wallis Test.)
}
\description{
An extension of the Kruskal-Wallis Test that allow selection of arbitrary reference group. Also provide Mean Ridit for each group. Mean Ridit of a group is... |
#Hierarchy (in order to ease searching via Strg + f):
# Part I - xxx
# Chapter 1 - Introduction
# 1.1.3 -------------------------------------------------------------------
# Part III - Program
# Chapter 19 - Functions
# 19.2.1 ------------------------------------------------------------------
#1
rescale01 <-... | /R for Data Science - Exercises III_Program.R | no_license | MalteJe/R-for-Data-Science---Notes | R | false | false | 20,577 | r | #Hierarchy (in order to ease searching via Strg + f):
# Part I - xxx
# Chapter 1 - Introduction
# 1.1.3 -------------------------------------------------------------------
# Part III - Program
# Chapter 19 - Functions
# 19.2.1 ------------------------------------------------------------------
#1
rescale01 <-... |
\name{mean.fts}
\alias{mean.fts}
\title{Mean functions for functional time series}
\description{
Computes mean of functional time series at each variable.
}
\usage{
\method{mean}{fts}(x, method = c("coordinate", "FM", "mode", "RP", "RPD", "radius"),
na.rm = TRUE, alpha, beta, weight, ...)
}
\arguments{
\item{x}{An ob... | /man/mean.fts.Rd | no_license | cran/ftsa | R | false | false | 3,895 | rd | \name{mean.fts}
\alias{mean.fts}
\title{Mean functions for functional time series}
\description{
Computes mean of functional time series at each variable.
}
\usage{
\method{mean}{fts}(x, method = c("coordinate", "FM", "mode", "RP", "RPD", "radius"),
na.rm = TRUE, alpha, beta, weight, ...)
}
\arguments{
\item{x}{An ob... |
#
# Conditionally download, unzip and prepare the data for plotting
#
if (!dir.exists('data/')) {
dir.create('data/')
}
if (!file.exists('data/NEI_data.zip')) {
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip', 'data/NEI_data.zip')
unzip('data/NEI_data.zip')
}
if (!exists("NEI"... | /project/load-data.R | no_license | scrain/exploratory-data-analysis | R | false | false | 444 | r | #
# Conditionally download, unzip and prepare the data for plotting
#
if (!dir.exists('data/')) {
dir.create('data/')
}
if (!file.exists('data/NEI_data.zip')) {
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip', 'data/NEI_data.zip')
unzip('data/NEI_data.zip')
}
if (!exists("NEI"... |
## makeCacheMatrix function takes a matrix and sets it as a Cached Matrix object
makeCacheMatrix <- function(x = matrix()) {
## initialize 'm' variable as the Inverse Matrix Cache with NULL value
m <- NULL
## setmatrix() function definition
setmatrix <- function(y) {
## call to setmatrix replaces 'x' v... | /cachematrix.R | no_license | ghutty/ProgrammingAssignment2 | R | false | false | 1,855 | r | ## makeCacheMatrix function takes a matrix and sets it as a Cached Matrix object
makeCacheMatrix <- function(x = matrix()) {
## initialize 'm' variable as the Inverse Matrix Cache with NULL value
m <- NULL
## setmatrix() function definition
setmatrix <- function(y) {
## call to setmatrix replaces 'x' v... |
histprod<-function(donnee,firstvar,lastvar=ncol(donnee),numr = 2,numc = 2,adjust=1) {
nbdesc <- lastvar-firstvar+1
xquant<-donnee[,firstvar:lastvar]
xrange<-max(apply(xquant,2,max,na.rm=TRUE))
#yrange<-max(hist(donnee[,firstvar],plot=FALSE)$density)
yrange<-max(density(donnee[,firstvar], na.rm = TRUE,adjust=ad... | /SensoMineR/R/histprod.R | no_license | ingted/R-Examples | R | false | false | 1,418 | r | histprod<-function(donnee,firstvar,lastvar=ncol(donnee),numr = 2,numc = 2,adjust=1) {
nbdesc <- lastvar-firstvar+1
xquant<-donnee[,firstvar:lastvar]
xrange<-max(apply(xquant,2,max,na.rm=TRUE))
#yrange<-max(hist(donnee[,firstvar],plot=FALSE)$density)
yrange<-max(density(donnee[,firstvar], na.rm = TRUE,adjust=ad... |
##############################################################
# This file holds:
# -the paramters for the simulated data, ie the underlying phenology parameters, sample sizes, etc.
# -the different parameters used for each of the methods in the simulation study
####################################
# global config stu... | /config.R | no_license | sdtaylor/phenology_gradients | R | false | false | 1,667 | r | ##############################################################
# This file holds:
# -the paramters for the simulated data, ie the underlying phenology parameters, sample sizes, etc.
# -the different parameters used for each of the methods in the simulation study
####################################
# global config stu... |
testlist <- list(x = c(1280061267L, -2687190L, -7012353L, -27393L, -1L, -2686977L, -144085427L, 1634752105L, 1702308136L, 1397053520L, 6516590L, 405405516L, -162783703L, 1936992588L, 506068991L, -2731494L, 791235625L, -232L, 704632575L, 570414327L, -24673L, -1616928865L, -1612720385L, -10726L, -8857857L, 692857302L... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962502-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 867 | r | testlist <- list(x = c(1280061267L, -2687190L, -7012353L, -27393L, -1L, -2686977L, -144085427L, 1634752105L, 1702308136L, 1397053520L, 6516590L, 405405516L, -162783703L, 1936992588L, 506068991L, -2731494L, 791235625L, -232L, 704632575L, 570414327L, -24673L, -1616928865L, -1612720385L, -10726L, -8857857L, 692857302L... |
#' Tests if there is a significant difference in abundance between selected conditions
#'
#' A nice long description
#'
#' @usage amp_test_species(data, design)
#'
#' @param data (required) A phyloseq object including sample data.
#' @param group (required) The group to test against.
#' @param sig Significance treshold... | /R/amp_test_species.R | no_license | giriarteS/ampvis | R | false | false | 7,902 | r | #' Tests if there is a significant difference in abundance between selected conditions
#'
#' A nice long description
#'
#' @usage amp_test_species(data, design)
#'
#' @param data (required) A phyloseq object including sample data.
#' @param group (required) The group to test against.
#' @param sig Significance treshold... |
#' Gives values for naked DNA BSWF (SETLOW) as a function of wavelength
#'
#' This function gives a set of numeric multipliers that can be used
#' as a weight to calculate effective doses and irradiances.
#'
#' @param w.length numeric array of w.length (nm)
#'
#' @return a numeric array of the same length as \co... | /photobiologyWavebands/R/dna.n.q.fun.r | no_license | ingted/R-Examples | R | false | false | 1,371 | r | #' Gives values for naked DNA BSWF (SETLOW) as a function of wavelength
#'
#' This function gives a set of numeric multipliers that can be used
#' as a weight to calculate effective doses and irradiances.
#'
#' @param w.length numeric array of w.length (nm)
#'
#' @return a numeric array of the same length as \co... |
library(qgtools)
### Name: ad.simudata
### Title: An R function to generate an AD model simulated data set
### Aliases: ad.simudata
### Keywords: AD model cotton simuated data cotf2
### ** Examples
library(qgtools)
data(cotf2)
Ped=cotf2[,c(1:5)]
Y=cotf2[,-c(1:5)]
YS=ad.simudata(Y,Ped,v=rep(20,7),b=c(100),Sim... | /data/genthat_extracted_code/qgtools/examples/ad.simudata.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 342 | r | library(qgtools)
### Name: ad.simudata
### Title: An R function to generate an AD model simulated data set
### Aliases: ad.simudata
### Keywords: AD model cotton simuated data cotf2
### ** Examples
library(qgtools)
data(cotf2)
Ped=cotf2[,c(1:5)]
Y=cotf2[,-c(1:5)]
YS=ad.simudata(Y,Ped,v=rep(20,7),b=c(100),Sim... |
testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(NA, NaN, NaN, -7.31045680883776e+303 ), temp = -Inf)
result <- do.call(meteor:::ET... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860225-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 351 | r | testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(NA, NaN, NaN, -7.31045680883776e+303 ), temp = -Inf)
result <- do.call(meteor:::ET... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{plot_gradient}
\alias{plot_gradient}
\title{Gradient Descent Algorithm - Plotting the Gradient Function}
\usage{
plot_gradient(obj)
}
\arguments{
\item{obj}{Object containing the results of a gradient descent implementation}
}
\description{
\code{plot_gradient}... | /man/plot_gradient.Rd | no_license | cran/gettingtothebottom | R | false | false | 994 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{plot_gradient}
\alias{plot_gradient}
\title{Gradient Descent Algorithm - Plotting the Gradient Function}
\usage{
plot_gradient(obj)
}
\arguments{
\item{obj}{Object containing the results of a gradient descent implementation}
}
\description{
\code{plot_gradient}... |
library(ape)
testtree <- read.tree("1684_5.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1684_5_unrooted.txt") | /codeml_files/newick_trees_processed/1684_5/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("1684_5.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1684_5_unrooted.txt") |
#' create and save the `project_io` table
source('data-raw/common.R')
project_costs <- projects %>%
filter(institute %in% nih.institutes) %>%
select(project.num, fy.cost) %>%
group_by(project.num) %>%
summarize(total.cost = sum(fy.cost, na.rm = TRUE))
pub_output <- project_costs %>%
left_join(publinks) %>%... | /data-raw/project_io.R | no_license | davebraze/nihexporter | R | false | false | 719 | r | #' create and save the `project_io` table
source('data-raw/common.R')
project_costs <- projects %>%
filter(institute %in% nih.institutes) %>%
select(project.num, fy.cost) %>%
group_by(project.num) %>%
summarize(total.cost = sum(fy.cost, na.rm = TRUE))
pub_output <- project_costs %>%
left_join(publinks) %>%... |
# slight re-definition of the bicor function
bicor = function(x, y = NULL, robustX = TRUE, robustY = TRUE, use = 'all.obs', maxPOutliers = 1, quick = 0,
pearsonFallback = "individual",
cosine = FALSE,
cosineX = cosine, cosineY = cosine,
nThreads = 0,... | /R/corFunctions.R | no_license | joshuamwang/WGCNA | R | false | false | 7,815 | r | # slight re-definition of the bicor function
bicor = function(x, y = NULL, robustX = TRUE, robustY = TRUE, use = 'all.obs', maxPOutliers = 1, quick = 0,
pearsonFallback = "individual",
cosine = FALSE,
cosineX = cosine, cosineY = cosine,
nThreads = 0,... |
library(caret)
timestamp <- format(Sys.time(), "%Y_%m_%d_%H_%M")
model <- "rfe_train"
#########################################################################
SLC14_1 <- function(n = 100) {
dat <- matrix(rnorm(n*20, sd = 3), ncol = 20)
foo <- function(x) x[1] + sin(x[2]) + log(abs(x[3])) + x[4]^2 + x[5]*x[6] + ... | /RegressionTests/Code/rfe_train.R | no_license | ilarischeinin/caret | R | false | false | 5,923 | r | library(caret)
timestamp <- format(Sys.time(), "%Y_%m_%d_%H_%M")
model <- "rfe_train"
#########################################################################
SLC14_1 <- function(n = 100) {
dat <- matrix(rnorm(n*20, sd = 3), ncol = 20)
foo <- function(x) x[1] + sin(x[2]) + log(abs(x[3])) + x[4]^2 + x[5]*x[6] + ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dfm}
\alias{dfm}
\title{A concatenation of 3 mini "bci-stem_YEAR" datasets.}
\format{An object of class \code{data.table} (inherits from \code{data.frame}) with 645 rows and 37 columns.}
\usage{
dfm
}
\de... | /man/dfm.Rd | no_license | ErvanCH/AGBflux_pack | R | false | true | 474 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{dfm}
\alias{dfm}
\title{A concatenation of 3 mini "bci-stem_YEAR" datasets.}
\format{An object of class \code{data.table} (inherits from \code{data.frame}) with 645 rows and 37 columns.}
\usage{
dfm
}
\de... |
#Assignment: Caching the Inverse of a Matrix
# Matrix inversion is usually a costly computation and there may be some benefit to caching
# the inverse of a matrix rather than computing it repeatedly (there are also alternatives
# to matrix inversion that we will not discuss here). Your assignment is to write a pair o... | /cachematrix.R | no_license | jp4711/ProgrammingAssignment2 | R | false | false | 2,127 | r | #Assignment: Caching the Inverse of a Matrix
# Matrix inversion is usually a costly computation and there may be some benefit to caching
# the inverse of a matrix rather than computing it repeatedly (there are also alternatives
# to matrix inversion that we will not discuss here). Your assignment is to write a pair o... |
## The functions below cache the inverse of a matrix
makecachematrix <- function(x = matrix()){ ## Cache Matrix function
inv <- NULL ## Initialize the inverse property
set <- function(y){ ## Method to set the matrix
x <<-y... | /cachematrix.R | no_license | Rahul-Tclb/ProgrammingAssignment2 | R | false | false | 1,685 | r | ## The functions below cache the inverse of a matrix
makecachematrix <- function(x = matrix()){ ## Cache Matrix function
inv <- NULL ## Initialize the inverse property
set <- function(y){ ## Method to set the matrix
x <<-y... |
#### Setup #####
source('R_Pipeline/initialize.R')
load_package('rbig', version = rbig.version)
################ Inputs ################
config_filename = 'em_config_01.yml'
args = commandArgs(trailingOnly = T)
if(!is.empty(args)){
config_filename = args[1]
}
################ Read & Validate config ################... | /event_prediction_pipeline/modules/event_mapper.R | no_license | genpack/tutorials | R | false | false | 1,222 | r | #### Setup #####
source('R_Pipeline/initialize.R')
load_package('rbig', version = rbig.version)
################ Inputs ################
config_filename = 'em_config_01.yml'
args = commandArgs(trailingOnly = T)
if(!is.empty(args)){
config_filename = args[1]
}
################ Read & Validate config ################... |
func_homo <-function(t,y,pars,Kpf,Kdf,Kfz,Kfm,Kfs,Kfp,Kps,Kpss,KfCTA,KfCCTA,Ktf,Ktd,Ktc,roM,roS,roP){
with(as.list(c(y,pars)),{
#browser()
Kd1<-function(T){return(1.178855e16*exp(-28925.227/1.987/T))}
Kd2<-function(T){return(1.3e15*exp(-27756.9/1.987/T))}
Kc<-function(X){return(3*X^2-3.17*X+2.9)}
FWin<-FinM+F... | /R/func_homo.R | no_license | timhockswender/HomoPolymer | R | false | false | 6,703 | r | func_homo <-function(t,y,pars,Kpf,Kdf,Kfz,Kfm,Kfs,Kfp,Kps,Kpss,KfCTA,KfCCTA,Ktf,Ktd,Ktc,roM,roS,roP){
with(as.list(c(y,pars)),{
#browser()
Kd1<-function(T){return(1.178855e16*exp(-28925.227/1.987/T))}
Kd2<-function(T){return(1.3e15*exp(-27756.9/1.987/T))}
Kc<-function(X){return(3*X^2-3.17*X+2.9)}
FWin<-FinM+F... |
library(SDMTools)
library(raster)
library(rgdal) # loads sp package
library(rgeos)
library(maptools)
library(abind)
library(pixmap)
library(offsetsim)
bin_raster <- function(current_feature_raster, current_filename, shape_data_files, agg_factor){
current_feature_raster[is.na(current_feature_raster)] = 0
if (cur... | /load_uruguay.R | no_license | isaacpeterson/uruguay | R | false | false | 7,178 | r | library(SDMTools)
library(raster)
library(rgdal) # loads sp package
library(rgeos)
library(maptools)
library(abind)
library(pixmap)
library(offsetsim)
bin_raster <- function(current_feature_raster, current_filename, shape_data_files, agg_factor){
current_feature_raster[is.na(current_feature_raster)] = 0
if (cur... |
\name{run.shinysky.example}
\alias{run.shinysky.example}
\title{run.shinysky.example}
\usage{
run.shinysky.example(example = c("0_all", "1_buttons&alerts", "2_select2",
"3_typeahead", "4_busyIndicator", "5_hotable", "6_jstree", "7_jscolor"))
}
\description{
run.shinysky.example
}
| /man/run.shinysky.example.Rd | permissive | dcurrier/ShinySky | R | false | false | 284 | rd | \name{run.shinysky.example}
\alias{run.shinysky.example}
\title{run.shinysky.example}
\usage{
run.shinysky.example(example = c("0_all", "1_buttons&alerts", "2_select2",
"3_typeahead", "4_busyIndicator", "5_hotable", "6_jstree", "7_jscolor"))
}
\description{
run.shinysky.example
}
|
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(NaN, 4.56899406001072e-308, 0, 1.96568260790928e-236, 0, 7.29111854287849e-304, NaN, 3.74829336516343e-310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738748-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 439 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(NaN, 4.56899406001072e-308, 0, 1.96568260790928e-236, 0, 7.29111854287849e-304, NaN, 3.74829336516343e-310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/btools_utilities.r
\name{safe.ifelse}
\alias{safe.ifelse}
\title{ifelse that can be used safely with dates}
\usage{
safe.ifelse(cond, yes, no)
}
\arguments{
\item{cond}{Logical expression.}
\item{yes}{Resulting value if cond is TRUE.}
\item... | /man/safe.ifelse.Rd | no_license | donboyd5/btools | R | false | true | 522 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/btools_utilities.r
\name{safe.ifelse}
\alias{safe.ifelse}
\title{ifelse that can be used safely with dates}
\usage{
safe.ifelse(cond, yes, no)
}
\arguments{
\item{cond}{Logical expression.}
\item{yes}{Resulting value if cond is TRUE.}
\item... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/components.R
\name{components}
\alias{components}
\title{Extract STR components}
\usage{
components(object)
}
\arguments{
\item{object}{Result of STR decomposition.}
}
\description{
\code{components} extracts components as time series from th... | /man/components.Rd | no_license | Laurae2/stR | R | false | true | 581 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/components.R
\name{components}
\alias{components}
\title{Extract STR components}
\usage{
components(object)
}
\arguments{
\item{object}{Result of STR decomposition.}
}
\description{
\code{components} extracts components as time series from th... |
#' @title Hierarchical cluster analysis
#' @description Hierarchical cluster analysis using several methods such as
#' ward.D", "ward.D2", "single", "complete", "average" (= UPGMA),
#' "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).
#' @param tabDF is a dataframe or numeric matrix, each row represen... | /R/analyze.R | no_license | QiStark/TCGAbiolinks | R | false | false | 80,962 | r | #' @title Hierarchical cluster analysis
#' @description Hierarchical cluster analysis using several methods such as
#' ward.D", "ward.D2", "single", "complete", "average" (= UPGMA),
#' "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).
#' @param tabDF is a dataframe or numeric matrix, each row represen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stratEst.R
\name{stratEst}
\alias{stratEst}
\title{Strategy Estimation Function}
\usage{
stratEst(
data,
strategies,
shares,
coefficients,
covariates,
sample.id,
response = "mixed",
sample.specific = c("shares", "probs", "trem... | /man/stratEst.Rd | no_license | fdvorak/stratEst | R | false | true | 15,317 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stratEst.R
\name{stratEst}
\alias{stratEst}
\title{Strategy Estimation Function}
\usage{
stratEst(
data,
strategies,
shares,
coefficients,
covariates,
sample.id,
response = "mixed",
sample.specific = c("shares", "probs", "trem... |
#leer hatco.completo.csv
flip <- read.delim("R-FlipEncodedData.txt", row.names=1)
#Mostramos las 6 primeras líneas del fichero de datos
head(flip)
names(flip)
#De todo el fichero, separamos las variables que utilizaremos como bases de segmentación
bases<-data.frame(flip[13:19])
descrip <- data.frame(flip[1:... | /flip/flip.R | no_license | jlopezsi/mktg | R | false | false | 3,751 | r | #leer hatco.completo.csv
flip <- read.delim("R-FlipEncodedData.txt", row.names=1)
#Mostramos las 6 primeras líneas del fichero de datos
head(flip)
names(flip)
#De todo el fichero, separamos las variables que utilizaremos como bases de segmentación
bases<-data.frame(flip[13:19])
descrip <- data.frame(flip[1:... |
## https://spark.rstudio.com/guides/pipelines/
library(sparklyr)
library(dplyr)
library(tidyr)
library(DBI)
library(nycflights13)
# Connect to local spark cluster and load data
# Convert titanic_train data into parquet format and output to disk
# https://github.com/rstudio/sparkDemos/blob/master/dev/cloudera/spark_ml... | /example_r_spark/04 SPARK_PipeLines.R | no_license | winterleitner/bi_assignment_3 | R | false | false | 3,148 | r | ## https://spark.rstudio.com/guides/pipelines/
library(sparklyr)
library(dplyr)
library(tidyr)
library(DBI)
library(nycflights13)
# Connect to local spark cluster and load data
# Convert titanic_train data into parquet format and output to disk
# https://github.com/rstudio/sparkDemos/blob/master/dev/cloudera/spark_ml... |
library(shiny)
library(leaflet)
library(dplyr)
source("get_routes_ex31b.R")
source("pvrp.R")
# name mappings:
# sequence_no = sqn
# salesman_id = smi
# salesman_no = smn
routes_all = get_routes_verbal()
salesman = get_salesman()
sqn_selected = 0
smn_selected = 1
smi_selected = 7
wkd_selected = 0
sqn_init = get_routes... | /doc/study/ex/leaflet_rota_cizimi_20190530/ex31b.R | permissive | mertnuhoglu/pmap | R | false | false | 3,404 | r | library(shiny)
library(leaflet)
library(dplyr)
source("get_routes_ex31b.R")
source("pvrp.R")
# name mappings:
# sequence_no = sqn
# salesman_id = smi
# salesman_no = smn
routes_all = get_routes_verbal()
salesman = get_salesman()
sqn_selected = 0
smn_selected = 1
smi_selected = 7
wkd_selected = 0
sqn_init = get_routes... |
library(shiny)
library(leaflet)
library(RColorBrewer)
gp.no.patients<- read.csv("gpNoPatientsData.csv", header=T)
prescriptions <- read.csv("Data_Practice.csv")
names(prescriptions)[names(prescriptions)=="Practice"] <- "PRACTICE_CODE"
gp.no.patients <- merge(prescriptions, gp.no.patients, by="PRACTICE_CODE")
gp.no.pat... | /app.R | permissive | maczokni/hackathon | R | false | false | 4,077 | r | library(shiny)
library(leaflet)
library(RColorBrewer)
gp.no.patients<- read.csv("gpNoPatientsData.csv", header=T)
prescriptions <- read.csv("Data_Practice.csv")
names(prescriptions)[names(prescriptions)=="Practice"] <- "PRACTICE_CODE"
gp.no.patients <- merge(prescriptions, gp.no.patients, by="PRACTICE_CODE")
gp.no.pat... |
group <- c("A", "B", "A", "B", "C", "C", "A", "A", "D")
test_that("get_partition_indices() works", {
set.seed(0)
outcomes <- c(
"normal", "cancer", "normal", "normal", "cancer", "cancer",
"normal", "normal", "normal", "cancer"
)
expect_equal(
get_partition_indices(outcomes,
training_frac = 0... | /tests/testthat/test-partition.R | permissive | minghao2016/mikropml | R | false | false | 1,039 | r |
group <- c("A", "B", "A", "B", "C", "C", "A", "A", "D")
test_that("get_partition_indices() works", {
set.seed(0)
outcomes <- c(
"normal", "cancer", "normal", "normal", "cancer", "cancer",
"normal", "normal", "normal", "cancer"
)
expect_equal(
get_partition_indices(outcomes,
training_frac = 0... |
# Script to run contemporary species distribution model for Papilio cresphontes & Zanthoxylum americanum
# Jeff Oliver
# jcoliver@email.arizona.edu
# 2018-01-10
rm(list = ls())
################################################################################
# SETUP
# Gather path information
# Load dependancies
butte... | /biodiversity-sdm-lesson/dev/Papilio_cresphontes-example-current-pairwise.R | permissive | Barnard-Botany/Spring-2020-Course-Development | R | false | false | 3,879 | r | # Script to run contemporary species distribution model for Papilio cresphontes & Zanthoxylum americanum
# Jeff Oliver
# jcoliver@email.arizona.edu
# 2018-01-10
rm(list = ls())
################################################################################
# SETUP
# Gather path information
# Load dependancies
butte... |
rm(list = ls())
setwd(dirname(parent.frame(2)$ofile))
library(ggplot2)
library(plyr)
library(dplyr)
library(tidyr)
library(readr)
source('./_function_task_expand_name.r')
source('./_compute_summary.r')
source('./_plot_parameter.r')
best.range = 5000
best.model.step.fn = function (errors) {
best.step = max(length(e... | /export/function_task_static_mul_subset.r | permissive | AndreasMadsen/stable-nalu | R | false | false | 2,378 | r | rm(list = ls())
setwd(dirname(parent.frame(2)$ofile))
library(ggplot2)
library(plyr)
library(dplyr)
library(tidyr)
library(readr)
source('./_function_task_expand_name.r')
source('./_compute_summary.r')
source('./_plot_parameter.r')
best.range = 5000
best.model.step.fn = function (errors) {
best.step = max(length(e... |
setwd("C:/rprogramming/household")
## Getting data
dataset <- read.table("household_power_consumption.txt",
header = TRUE, sep = ";", na.strings = "?")
## Subsetting data and convert Date-Time
dataset$Date <- as.Date(dataset$Date, "%d/%m/%Y")
data <- subset(dataset, Date == "2007-02-01"... | /plot3.r | no_license | Leanide/ExData_Plotting1 | R | false | false | 972 | r | setwd("C:/rprogramming/household")
## Getting data
dataset <- read.table("household_power_consumption.txt",
header = TRUE, sep = ";", na.strings = "?")
## Subsetting data and convert Date-Time
dataset$Date <- as.Date(dataset$Date, "%d/%m/%Y")
data <- subset(dataset, Date == "2007-02-01"... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{isAvailable}
\alias{isAvailable}
\alias{verifyAvailable}
\title{Check if RStudio is running.}
\usage{
isAvailable(version_needed = NULL)
verifyAvailable(version_needed = NULL)
}
\arguments{
\item{version_needed}{An optional version specification.
If suppli... | /man/isAvailable.Rd | no_license | Libardo1/rstudioapi | R | false | false | 609 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{isAvailable}
\alias{isAvailable}
\alias{verifyAvailable}
\title{Check if RStudio is running.}
\usage{
isAvailable(version_needed = NULL)
verifyAvailable(version_needed = NULL)
}
\arguments{
\item{version_needed}{An optional version specification.
If suppli... |
modelInfo <- list(label = "CART",
library = "rpart",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('maxdepth'),
class = c("numeric"),
label = c("Max... | /models/files/rpart2.R | no_license | bleutner/caret | R | false | false | 8,742 | r | modelInfo <- list(label = "CART",
library = "rpart",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('maxdepth'),
class = c("numeric"),
label = c("Max... |
\name{NISTpoiseTOpascalSec}
\alias{NISTpoiseTOpascalSec}
\title{Convert poise to pascal second }
\usage{NISTpoiseTOpascalSec(poise)}
\description{\code{NISTpoiseTOpascalSec} converts from poise (P) to pascal second (Pa * s) }
\arguments{
\item{poise}{poise (P) }
}
\value{pascal second (Pa * s) }
\source{
National In... | /man/NISTpoiseTOpascalSec.Rd | no_license | cran/NISTunits | R | false | false | 766 | rd | \name{NISTpoiseTOpascalSec}
\alias{NISTpoiseTOpascalSec}
\title{Convert poise to pascal second }
\usage{NISTpoiseTOpascalSec(poise)}
\description{\code{NISTpoiseTOpascalSec} converts from poise (P) to pascal second (Pa * s) }
\arguments{
\item{poise}{poise (P) }
}
\value{pascal second (Pa * s) }
\source{
National In... |
# Copyright 2011 Revolution Analytics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | /pkg/R/keyval.R | no_license | andrewzhang1/rmr2 | R | false | false | 8,320 | r | # Copyright 2011 Revolution Analytics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
\name{doublingTime}
\Rdversion{1.1}
\alias{doublingTime}
\title{
Doubling time for genome projects
}
\description{
Calculates the doubling time of genome sequencing project releases
}
\usage{
doublingTime(x, subset, time = "days", curdate=TRUE)
}
\arguments{
\item{x}{ genomes data frame with class 'genomes'}
\ite... | /man/doublingTime.Rd | no_license | cstubben/genomes2 | R | false | false | 820 | rd | \name{doublingTime}
\Rdversion{1.1}
\alias{doublingTime}
\title{
Doubling time for genome projects
}
\description{
Calculates the doubling time of genome sequencing project releases
}
\usage{
doublingTime(x, subset, time = "days", curdate=TRUE)
}
\arguments{
\item{x}{ genomes data frame with class 'genomes'}
\ite... |
#' Set all missing values to indicated value
#'
#' Quickly set all missing values to indicated value.
#' @param data input data, in \link{data.table} format only.
#' @param value a single value or a list of two values to be set to. See 'Details'.
#' @param exclude column index or name to be excluded.
#' @keywords set_m... | /R/set_missing.r | no_license | jcboost/DataExplorer | R | false | false | 3,722 | r | #' Set all missing values to indicated value
#'
#' Quickly set all missing values to indicated value.
#' @param data input data, in \link{data.table} format only.
#' @param value a single value or a list of two values to be set to. See 'Details'.
#' @param exclude column index or name to be excluded.
#' @keywords set_m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/abm6.R
\name{make_schedule}
\alias{make_schedule}
\title{Make schedule}
\usage{
make_schedule(time = 30, type = "base", total_days = 5, df)
}
\arguments{
\item{time}{number of days; defaults to 30}
\item{type}{"base", "On/off", "A/B", "Remot... | /1 - R package/BackToSchool/man/make_schedule.Rd | no_license | mccorvie/BackToSchool2 | R | false | true | 669 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/abm6.R
\name{make_schedule}
\alias{make_schedule}
\title{Make schedule}
\usage{
make_schedule(time = 30, type = "base", total_days = 5, df)
}
\arguments{
\item{time}{number of days; defaults to 30}
\item{type}{"base", "On/off", "A/B", "Remot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.