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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Candidate-class.R
\docType{class}
\name{Candidate-class}
\alias{Candidate-class}
\alias{initialize,createCandidate-method}
\title{A presidential candidate object}
\description{
Object of class \code{Candidate} as created by the \code{... | /electPack/man/Candidate.Rd | no_license | daniellekorman/PS6 | R | false | false | 813 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Candidate-class.R
\docType{class}
\name{Candidate-class}
\alias{Candidate-class}
\alias{initialize,createCandidate-method}
\title{A presidential candidate object}
\description{
Object of class \code{Candidate} as created by the \code{... |
`FTR.plot.map` <-
function( paths, options )
{
if (length(paths$mw)==0){paths$mw <- 1}
if (nrow(paths) < 50){
options$map$zone <- "all_zones"
FTR.plot.map.batch(paths, options)
}
sPaths <- split(paths, paths$sink.zone)
for (zone in names(sPaths)){
options$map$zone <- zone
.FTR.plot.map.batch(... | /R Extension/RMG/Utilities/Interfaces/FTR/R/FTR.plot.map.R | no_license | uhasan1/QLExtension-backup | R | false | false | 352 | r | `FTR.plot.map` <-
function( paths, options )
{
if (length(paths$mw)==0){paths$mw <- 1}
if (nrow(paths) < 50){
options$map$zone <- "all_zones"
FTR.plot.map.batch(paths, options)
}
sPaths <- split(paths, paths$sink.zone)
for (zone in names(sPaths)){
options$map$zone <- zone
.FTR.plot.map.batch(... |
#' Summarize model performance in rNCV
#'
#' Gives a summary of model performance. Returns average of each metric specified in rNCV (whether MAE, RMSE, R^2, or something else) for both the training and testing set for each method.
#' @param rNCV.obj The rNCV object returned by the function \code{rNCV()}.
#' @importFrom... | /R/rNCV.perf.summ.R | no_license | kforthman/caretStack | R | false | false | 1,467 | r | #' Summarize model performance in rNCV
#'
#' Gives a summary of model performance. Returns average of each metric specified in rNCV (whether MAE, RMSE, R^2, or something else) for both the training and testing set for each method.
#' @param rNCV.obj The rNCV object returned by the function \code{rNCV()}.
#' @importFrom... |
library(cowfit)
# LMM ---------------------------------------------------------------------
## SMALL
set.seed(1)
myherd <- mastitis[c("herd", "id", "sire")]
df <- expand.grid(protein = 1:5,
animal = unique(mastitis$id))
df <- merge(df, myherd, by.x = "animal", by.y = "id")
myf <- y ~ protein + (1|herd)... | /create_data.R | no_license | retodomax/cowfit | R | false | false | 1,840 | r | library(cowfit)
# LMM ---------------------------------------------------------------------
## SMALL
set.seed(1)
myherd <- mastitis[c("herd", "id", "sire")]
df <- expand.grid(protein = 1:5,
animal = unique(mastitis$id))
df <- merge(df, myherd, by.x = "animal", by.y = "id")
myf <- y ~ protein + (1|herd)... |
#' Download one or more works using a Project Gutenberg ID
#'
#' Download one or more works by their Project Gutenberg IDs into
#' a data frame with one row per line per work. This can be used to download
#' a single work of interest or multiple at a time. You can look up the
#' Gutenberg IDs of a work using the \code{... | /gutenbergr/R/gutenberg_download.R | no_license | ingted/R-Examples | R | false | false | 6,564 | r | #' Download one or more works using a Project Gutenberg ID
#'
#' Download one or more works by their Project Gutenberg IDs into
#' a data frame with one row per line per work. This can be used to download
#' a single work of interest or multiple at a time. You can look up the
#' Gutenberg IDs of a work using the \code{... |
train.all$TransactionDate <- as.Date(train.all$TransactionDate)
few.columns <- c("TransactionDate", "SalesPrice","Amount","Age","ResidenceArea")
dataset <- train.all[,few.columns]
dataset$Age <- as.factor(dataset$Age)
dataset$ResidenceArea <- as.factor(dataset$ResidenceArea)
########################################... | /generic.functions/Data.visualization.functions.R | no_license | PraveenAdepu/kaggle_competitions | R | false | false | 7,331 | r | train.all$TransactionDate <- as.Date(train.all$TransactionDate)
few.columns <- c("TransactionDate", "SalesPrice","Amount","Age","ResidenceArea")
dataset <- train.all[,few.columns]
dataset$Age <- as.factor(dataset$Age)
dataset$ResidenceArea <- as.factor(dataset$ResidenceArea)
########################################... |
library(tidyverse)
rm(list = ls())
method <- "comp1"
file <- paste0("containers/", method, "/definition.yml")
# read definition and build docker
definition <- yaml::read_yaml(file)
docker_repo <- definition$docker_repository
folder <- stringr::str_replace(file, "/definition.yml$", "")
zzz <- processx::run("docker", ... | /data-raw/0-add_new_container.R | no_license | dcellwanger/dynmethods | R | false | false | 2,144 | r | library(tidyverse)
rm(list = ls())
method <- "comp1"
file <- paste0("containers/", method, "/definition.yml")
# read definition and build docker
definition <- yaml::read_yaml(file)
docker_repo <- definition$docker_repository
folder <- stringr::str_replace(file, "/definition.yml$", "")
zzz <- processx::run("docker", ... |
library(dplyr)
library(stringr)
library(readr)
attach(zoo2MainSpecz)
str(zoo2MainSpecz)
# vamos a quedarnos con las variables y las clases de las primeras tres
# primero nos quedamos con las que sea True para la clase 1 (smooth)
cat1.smooth = zoo2MainSpecz %>%
select(names(zoo2MainSpecz)[1:4], names(zoo2MainSpecz... | /TBD/data_manipulation.R | permissive | VGGatGitHub/Hackathon2020 | R | false | false | 2,072 | r | library(dplyr)
library(stringr)
library(readr)
attach(zoo2MainSpecz)
str(zoo2MainSpecz)
# vamos a quedarnos con las variables y las clases de las primeras tres
# primero nos quedamos con las que sea True para la clase 1 (smooth)
cat1.smooth = zoo2MainSpecz %>%
select(names(zoo2MainSpecz)[1:4], names(zoo2MainSpecz... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{wrapper_scaler}
\alias{wrapper_scaler}
\title{Internal Functions}
\usage{
wrapper_scaler(x, scaler, base, system, ignore)
}
\description{
These are not to be used directly by the users.
}
\keyword{internal}
| /man/wrapper_scaler.Rd | permissive | EmilHvitfeldt/unitscales | R | false | true | 302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{wrapper_scaler}
\alias{wrapper_scaler}
\title{Internal Functions}
\usage{
wrapper_scaler(x, scaler, base, system, ignore)
}
\description{
These are not to be used directly by the users.
}
\keyword{internal}
|
BoxCox <- function(y, lambda, rescale=TRUE,
na.rm=rescale){
##
## 1. lambda, sign.y, log(abs(y+lambda[2]))
##
eps <- (1/50) # from MASS::boxcox
la <- lambda[1]
if(length(lambda)<2){
y0 <- 0
sgn.y <- sign(y, 1)
lay <- log(abs(y))
} else {
y0 <- lambda[2]
sgn.y <- sign(... | /R/BoxCox.R | no_license | sbgraves237/Ecfun | R | false | false | 2,802 | r | BoxCox <- function(y, lambda, rescale=TRUE,
na.rm=rescale){
##
## 1. lambda, sign.y, log(abs(y+lambda[2]))
##
eps <- (1/50) # from MASS::boxcox
la <- lambda[1]
if(length(lambda)<2){
y0 <- 0
sgn.y <- sign(y, 1)
lay <- log(abs(y))
} else {
y0 <- lambda[2]
sgn.y <- sign(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logger.R
\name{setLevel}
\alias{setLevel}
\title{Set \var{logging.level} for the object.}
\usage{
setLevel(level, container = "")
}
\arguments{
\item{level}{The new level for this object. Can be numeric or character.}
\item{container}{a logg... | /man/setLevel.Rd | no_license | DrRoad/periscope | R | false | true | 562 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logger.R
\name{setLevel}
\alias{setLevel}
\title{Set \var{logging.level} for the object.}
\usage{
setLevel(level, container = "")
}
\arguments{
\item{level}{The new level for this object. Can be numeric or character.}
\item{container}{a logg... |
#Please change these according to your paths.
.libPaths(c(.libPaths(),"/n/home13/yasinkaymaz/biotools/Rlibs/"))
workingDirectory='~/Documents/DulacLab/SecondRound/GSEA/'
source("~/Dropbox/codes/Brainformatics/scripts/functions.R")
### Run
library(Matrix)
library(Seurat)
library(dplyr)
library(tidyverse)
load(paste('~/... | /scripts/GSEA_DGE_rerun.R | no_license | yasinkaymaz/Brainformatics | R | false | false | 7,358 | r | #Please change these according to your paths.
.libPaths(c(.libPaths(),"/n/home13/yasinkaymaz/biotools/Rlibs/"))
workingDirectory='~/Documents/DulacLab/SecondRound/GSEA/'
source("~/Dropbox/codes/Brainformatics/scripts/functions.R")
### Run
library(Matrix)
library(Seurat)
library(dplyr)
library(tidyverse)
load(paste('~/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-label-repel.R, R/geom-text-repel.R
\name{geom_label_repel}
\alias{geom_label_repel}
\alias{geom_text_repel}
\title{Repulsive textual annotations.}
\usage{
geom_label_repel(mapping = NULL, data = NULL, stat = "identity",
parse = FALSE, ... | /man/geom_text_repel.Rd | no_license | jrandall/ggrepel | R | false | true | 5,628 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-label-repel.R, R/geom-text-repel.R
\name{geom_label_repel}
\alias{geom_label_repel}
\alias{geom_text_repel}
\title{Repulsive textual annotations.}
\usage{
geom_label_repel(mapping = NULL, data = NULL, stat = "identity",
parse = FALSE, ... |
context("Test MaxMind.")
test_that("non-existent files are detected", {
expect_that(maxmind("foo","[@8"), throws_error("could not be opened"))
})
test_that("non-existent IPs are detected", {
file <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate")
results <- maxmind("foo",file, "country_nam... | /tests/testthat/test_maxmind.R | permissive | pachevalier/rgeolocate | R | false | false | 3,123 | r | context("Test MaxMind.")
test_that("non-existent files are detected", {
expect_that(maxmind("foo","[@8"), throws_error("could not be opened"))
})
test_that("non-existent IPs are detected", {
file <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate")
results <- maxmind("foo",file, "country_nam... |
#' @title Transform Data into Row-Column-Value Format
#' @description Transform raw Eurostat data table into the row-column-value
#' format (RCV).
#' @param dat a data_frame from \code{\link{get_eurostat_raw}}.
#' @param time_format a string giving a type of the conversion of the
#' time column from ... | /R/tidy_eurostat.R | permissive | antaldaniel/eurostat | R | false | false | 5,075 | r | #' @title Transform Data into Row-Column-Value Format
#' @description Transform raw Eurostat data table into the row-column-value
#' format (RCV).
#' @param dat a data_frame from \code{\link{get_eurostat_raw}}.
#' @param time_format a string giving a type of the conversion of the
#' time column from ... |
library(shiny)
library(shinydashboard)
library(plotly)
library(quantmod)
library(ggplot2)
mydb <- read.csv("SynthData.csv")
#mydb$Date <- as.Date(as.character(mydb$Date), format = "%d-%m-%Y")
# minx <- min(mydb$Part.Number)
# maxx <- max(mydb$Part.Number)
# str(mydb$Part.Number)
# str(mydb$Unit.Cost)
# unique(mydb$U... | /app.R | no_license | godfather9/icrm | R | false | false | 1,730 | r | library(shiny)
library(shinydashboard)
library(plotly)
library(quantmod)
library(ggplot2)
mydb <- read.csv("SynthData.csv")
#mydb$Date <- as.Date(as.character(mydb$Date), format = "%d-%m-%Y")
# minx <- min(mydb$Part.Number)
# maxx <- max(mydb$Part.Number)
# str(mydb$Part.Number)
# str(mydb$Unit.Cost)
# unique(mydb$U... |
#' @title Reading Skills data
#'
#' @description Data for assessing the contribution of non-verbal IQ to children's reading skills in dyslexic and non-dyslexic children.
#'
#' @format A data frame containing 44 observations on 3 variables.
#' \describe{
#' \item{\code{accuracy}}{a reading score.}
#' \item{\code{... | /fuzzedpackages/FlexReg/R/DATA.R | no_license | akhikolla/testpackages | R | false | false | 6,176 | r | #' @title Reading Skills data
#'
#' @description Data for assessing the contribution of non-verbal IQ to children's reading skills in dyslexic and non-dyslexic children.
#'
#' @format A data frame containing 44 observations on 3 variables.
#' \describe{
#' \item{\code{accuracy}}{a reading score.}
#' \item{\code{... |
#!/usr/bin/env Rscript
pz <- 1/2
ps <- c('Z'=1/2, '~Z'=1/2)
pm <- c('Z'=1/2, '~Z'=1/2)
s <- c(TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE)
m <- c(TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE)
z <- c(TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE)... | /HW12/26.R | no_license | WillMc93/EN.605.657 | R | false | false | 1,376 | r | #!/usr/bin/env Rscript
pz <- 1/2
ps <- c('Z'=1/2, '~Z'=1/2)
pm <- c('Z'=1/2, '~Z'=1/2)
s <- c(TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE)
m <- c(TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE)
z <- c(TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert.R
\name{ethiopianToGregorian}
\alias{ethiopianToGregorian}
\title{Convert Ethiopian Date to Gregorian Calendar}
\usage{
ethiopianToGregorian(year = numeric(), month = numeric(), date = numeric())
}
\arguments{
\item{year}{numeric repr... | /man/ethiopianToGregorian.Rd | permissive | d-callan/ethiopianDate | R | false | true | 665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert.R
\name{ethiopianToGregorian}
\alias{ethiopianToGregorian}
\title{Convert Ethiopian Date to Gregorian Calendar}
\usage{
ethiopianToGregorian(year = numeric(), month = numeric(), date = numeric())
}
\arguments{
\item{year}{numeric repr... |
#' Create a custom legend
#'
#' A customized legend sections the group taxonomy as headers
#' and lists the subgroup taxonomies below each group header, for all the groups.
#'
#' @param mdf data.frame melted dataframe
#' @param cdf data.frame color dataframe
#' @param group_level string of larger taxonomic group
#' @pa... | /R/custom_legend.R | permissive | katefu/microshades | R | false | false | 3,889 | r | #' Create a custom legend
#'
#' A customized legend sections the group taxonomy as headers
#' and lists the subgroup taxonomies below each group header, for all the groups.
#'
#' @param mdf data.frame melted dataframe
#' @param cdf data.frame color dataframe
#' @param group_level string of larger taxonomic group
#' @pa... |
library(tm)
library(rtweet)
library(wordcloud)
library(RColorBrewer)
library(e1071)
library(class)
library(openssl)
library(httpuv)
api_key <- ""
api_secret <- ""
access_token <- ""
access_secret <- ""
twitter_token <- create_token(
app = "NLP_Exercise28082020",
consumer_key = api_key,
consum... | /NLP.R | no_license | bschmalbach/naturalLanguageProcessing | R | false | false | 1,063 | r | library(tm)
library(rtweet)
library(wordcloud)
library(RColorBrewer)
library(e1071)
library(class)
library(openssl)
library(httpuv)
api_key <- ""
api_secret <- ""
access_token <- ""
access_secret <- ""
twitter_token <- create_token(
app = "NLP_Exercise28082020",
consumer_key = api_key,
consum... |
HospitalPrices_Server<-function(input,output,Session){
# Define server logic required to draw bar plot
output$hospitalCharges_barPlot <- renderPlotly({
if(input$hospitalCharges_y=='AveragePricePerAppendectomy'){
title_var='Average Price per Appendectomy in 2016'
} else if (input$hospital... | /Health_Spending/Server_Components/HospitalPrices_Server.R | no_license | asidamo/Health-Spending-and-Outcomes | R | false | false | 1,102 | r | HospitalPrices_Server<-function(input,output,Session){
# Define server logic required to draw bar plot
output$hospitalCharges_barPlot <- renderPlotly({
if(input$hospitalCharges_y=='AveragePricePerAppendectomy'){
title_var='Average Price per Appendectomy in 2016'
} else if (input$hospital... |
# Reference: Steph Locke, Data Manipulation in R
# https://data-flair.training/blogs/descriptive-statistics-in-r/
# https://bookdown.org/content/2880/module-1-introduction-to-r.html
# Sharon Machlis, Practical R in Mass Communication and Journalism
# https://github.com/smach/R4JournalismBook
# https://zhuanlan.zhihu.co... | /R02_7.R | no_license | avaa3717/FinDB_2020 | R | false | false | 1,631 | r | # Reference: Steph Locke, Data Manipulation in R
# https://data-flair.training/blogs/descriptive-statistics-in-r/
# https://bookdown.org/content/2880/module-1-introduction-to-r.html
# Sharon Machlis, Practical R in Mass Communication and Journalism
# https://github.com/smach/R4JournalismBook
# https://zhuanlan.zhihu.co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mvn_mcar_30_unstd_fit.sem.R
\name{mvn_mcar_30_fit.sem_task}
\alias{mvn_mcar_30_fit.sem_task}
\title{Fit Simple Mediation Model
for Data Generated from a Multivariate Normal Distribution
with Data Missing Completely at Random - 30\% - Structur... | /man/mvn_mcar_30_fit.sem_task.Rd | permissive | jeksterslabds/jeksterslabRmedsimple | R | false | true | 6,341 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mvn_mcar_30_unstd_fit.sem.R
\name{mvn_mcar_30_fit.sem_task}
\alias{mvn_mcar_30_fit.sem_task}
\title{Fit Simple Mediation Model
for Data Generated from a Multivariate Normal Distribution
with Data Missing Completely at Random - 30\% - Structur... |
library(dplyr)
library(data.table)
tags<-fread('PythonTags.csv',header=T)
tags<-tags[which(tags$Tag!='python'),]
data<-fread('Python_Questions_clean.csv',header = T,sep="\t")
raw_data<-merge(data,tags,by.x='Id',by.y = 'Id',all.x=T)
grouped_tags<-group_by(tags,Id)%>%
summarise(tag_count=n())
tag_popu<-as.... | /lib/tag_features.R | no_license | wvz/ADA-Project | R | false | false | 2,846 | r | library(dplyr)
library(data.table)
tags<-fread('PythonTags.csv',header=T)
tags<-tags[which(tags$Tag!='python'),]
data<-fread('Python_Questions_clean.csv',header = T,sep="\t")
raw_data<-merge(data,tags,by.x='Id',by.y = 'Id',all.x=T)
grouped_tags<-group_by(tags,Id)%>%
summarise(tag_count=n())
tag_popu<-as.... |
library(gsynth)
library(panelView)
#setwd("/media/minh/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
#setwd("D:/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
setwd("C:/Users/Nga Nguy/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
source("../../Code/Spri... | /Code/Winter 2019/Models_Synth.R | no_license | mdtrinh/vietnam_elections | R | false | false | 12,332 | r | library(gsynth)
library(panelView)
#setwd("/media/minh/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
#setwd("D:/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
setwd("C:/Users/Nga Nguy/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data")
source("../../Code/Spri... |
summary.glm(model1)
summary.glm(model2)
summary.glm(model3)
summary.glm(model4)
summary.glm(model5) | /STAT453/Lab_4/all5summaries.R | permissive | T-R0D/Past-Courses | R | false | false | 99 | r | summary.glm(model1)
summary.glm(model2)
summary.glm(model3)
summary.glm(model4)
summary.glm(model5) |
## PARTE 2: Trata das pesquisas de 2015Q4 até 2016Q1
## Versão de teste. Estado atual:
# -- Lê dicionário 4tri2015 até 1tri2016
# -- Lê arquivo PNADC_012016
## SUPONDO ARQUIVOS .zip NO WORKING DIRECTORY
## PACOTES
# Leitura de "fixed width files" muito mais rapida que função base
library(readr)
# Pacote disponibiliza ... | /leitura_parte2.R | no_license | arturbfr/alexei_git | R | false | false | 2,281 | r | ## PARTE 2: Trata das pesquisas de 2015Q4 até 2016Q1
## Versão de teste. Estado atual:
# -- Lê dicionário 4tri2015 até 1tri2016
# -- Lê arquivo PNADC_012016
## SUPONDO ARQUIVOS .zip NO WORKING DIRECTORY
## PACOTES
# Leitura de "fixed width files" muito mais rapida que função base
library(readr)
# Pacote disponibiliza ... |
# Script to analyse MS data
# ON beast
library(plyr)
library(ggrepel)
library(ggplot2)
# On beast
wd="/home/dyap/Projects/Takeda_T3/MS data/Expt3_CLK1"
pat="CLK_resMat_PSM_GeneLevel_vsn_Vars_v01.csv"
setwd(wd)
file_names = list.files(pattern = pat)
MS<-as.data.frame(read.csv(file_names[1],header=TRUE))
MS<-read.csv... | /R-scripts/SuppFig_CLK1_IPMS_v1.R | no_license | oncoapop/data_reporting | R | false | false | 21,805 | r | # Script to analyse MS data
# ON beast
library(plyr)
library(ggrepel)
library(ggplot2)
# On beast
wd="/home/dyap/Projects/Takeda_T3/MS data/Expt3_CLK1"
pat="CLK_resMat_PSM_GeneLevel_vsn_Vars_v01.csv"
setwd(wd)
file_names = list.files(pattern = pat)
MS<-as.data.frame(read.csv(file_names[1],header=TRUE))
MS<-read.csv... |
library(raster)
library(snow)
Rpath <-"D:/cropdiv_usa/ReclMaskedData"
Tpath <- "D:/cropdiv_usa/TmpDivData"
PMpath <- "D:/cropdiv_usa/PerennialMask"
dir.create(PMpath)
# Create mask ----
CDLfs <- Sys.glob(path = file.path(Rpath, '*.tif'))
CDLs <- stack(lapply(CDLfs, raster))
# perennials crops (to mask)
cropcode <- ... | /05_TmpDivPerennMasked.R | no_license | AramburuMerlos/cropdiv_usa | R | false | false | 1,122 | r | library(raster)
library(snow)
Rpath <-"D:/cropdiv_usa/ReclMaskedData"
Tpath <- "D:/cropdiv_usa/TmpDivData"
PMpath <- "D:/cropdiv_usa/PerennialMask"
dir.create(PMpath)
# Create mask ----
CDLfs <- Sys.glob(path = file.path(Rpath, '*.tif'))
CDLs <- stack(lapply(CDLfs, raster))
# perennials crops (to mask)
cropcode <- ... |
#' @include nn.R
NULL
#' Identity module
#'
#' A placeholder identity operator that is argument-insensitive.
#'
#' @param ... any arguments (unused)
#'
#' @examples
#' m <- nn_identity(54, unused_argument1 = 0.1, unused_argument2 = FALSE)
#' input <- torch_randn(128, 20)
#' output <- m(input)
#' print(output$size(... | /R/nn-linear.R | permissive | qykong/torch | R | false | false | 4,778 | r | #' @include nn.R
NULL
#' Identity module
#'
#' A placeholder identity operator that is argument-insensitive.
#'
#' @param ... any arguments (unused)
#'
#' @examples
#' m <- nn_identity(54, unused_argument1 = 0.1, unused_argument2 = FALSE)
#' input <- torch_randn(128, 20)
#' output <- m(input)
#' print(output$size(... |
\name{sphereX}
\alias{sphereX}
\title{
Sphere Data Matrix
}
\description{
The data matrix is scaled and sphered so it is orthonormal.
The Cholesky decomposition is used.
}
\usage{
sphereX(X)
}
\arguments{
\item{X}{
\code{X} rectangular data matrix
}
}
\value{
sphered matrix
}
\author{
A. I. ... | /man/sphereX.Rd | no_license | cran/bestglm | R | false | false | 513 | rd | \name{sphereX}
\alias{sphereX}
\title{
Sphere Data Matrix
}
\description{
The data matrix is scaled and sphered so it is orthonormal.
The Cholesky decomposition is used.
}
\usage{
sphereX(X)
}
\arguments{
\item{X}{
\code{X} rectangular data matrix
}
}
\value{
sphered matrix
}
\author{
A. I. ... |
estimateTheta <- function(obs, flavor=c("learning", "superLearning"), learnTheta,
light=TRUE, SuperLearner.=NULL, ..., verbose=FALSE) {
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## Validate arguments
## - - - - - - - - - - - - - - - - - - - - - - - - - - ... | /tmle.npvi/R/estimateTheta.R | no_license | ingted/R-Examples | R | false | false | 1,976 | r | estimateTheta <- function(obs, flavor=c("learning", "superLearning"), learnTheta,
light=TRUE, SuperLearner.=NULL, ..., verbose=FALSE) {
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## Validate arguments
## - - - - - - - - - - - - - - - - - - - - - - - - - - ... |
#' Get similarity scores and probability
#'
#' This function computes the similarity scores between the sample SNPs and the haplotype's
#' reference.
#'
#' @details classifSNPs computes, for each individual, similarity scores for
#' all the present haplotypes. For each SNP, we compute as many similarity scores
#' as ha... | /R/classifSNPs.R | permissive | robloughnan/scoreInvHap | R | false | false | 4,172 | r | #' Get similarity scores and probability
#'
#' This function computes the similarity scores between the sample SNPs and the haplotype's
#' reference.
#'
#' @details classifSNPs computes, for each individual, similarity scores for
#' all the present haplotypes. For each SNP, we compute as many similarity scores
#' as ha... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project.R
\name{identified.ptm.strings<-,ProjectSummary-method}
\alias{identified.ptm.strings<-,ProjectSummary-method}
\title{Replaces the project PTMs}
\usage{
\S4method{identified.ptm.strings}{ProjectSummary}(object) <- value
}
\arguments{
... | /man/identified.ptm.strings-set-ProjectSummary-method.Rd | no_license | booker-tremayne/new-prideR | R | false | true | 446 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project.R
\name{identified.ptm.strings<-,ProjectSummary-method}
\alias{identified.ptm.strings<-,ProjectSummary-method}
\title{Replaces the project PTMs}
\usage{
\S4method{identified.ptm.strings}{ProjectSummary}(object) <- value
}
\arguments{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/top_counts.R
\name{top_counts}
\alias{top_counts}
\title{Get a count matrix of top genes}
\usage{
top_counts(res, rld, by = "id", col_names, row_names = "gene_name", ...)
}
\arguments{
\item{res}{an annotated DESeq2 results file (and \code{to... | /man/top_counts.Rd | no_license | topherconley/hciR | R | false | true | 979 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/top_counts.R
\name{top_counts}
\alias{top_counts}
\title{Get a count matrix of top genes}
\usage{
top_counts(res, rld, by = "id", col_names, row_names = "gene_name", ...)
}
\arguments{
\item{res}{an annotated DESeq2 results file (and \code{to... |
#+
vcf_to_dataframe <- function(vcf_files){
require(tidyverse)
require(fs)
require(vcfR)
temp = read.vcfR(vcf_files$vcf_out)
temp = vcfR2tidy(temp)
temp = temp$fix %>%
as_tibble() %>%
mutate(filename = vcf_files$vcf_out) %>%
select(filename, everything())
variant_table_snv = ... | /R/vcf_2_dataframe.R | no_license | Ashastry2/TypeSeqHPV | R | false | false | 4,941 | r | #+
vcf_to_dataframe <- function(vcf_files){
require(tidyverse)
require(fs)
require(vcfR)
temp = read.vcfR(vcf_files$vcf_out)
temp = vcfR2tidy(temp)
temp = temp$fix %>%
as_tibble() %>%
mutate(filename = vcf_files$vcf_out) %>%
select(filename, everything())
variant_table_snv = ... |
#Ex5.1, Page 194
m<-matrix(c(0.20,0.05,0.10,0.15,0.20,0.30),nrow=2,ncol=3)
rownames(m)<-c("100","250")
colnames(m)<-c("0","100","200")
print(m)
#To find P(Y>=100)
prob<-m[1,2]+m[1,3]+m[2,2]+m[2,3]
print(paste("P(Y>=100)=",prob)) | /Probability_And_Statistics_For_Engineering_And_The_Sciences_by_Jay_L_Devore/CH5/EX5.1/Ex5_1.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 239 | r | #Ex5.1, Page 194
m<-matrix(c(0.20,0.05,0.10,0.15,0.20,0.30),nrow=2,ncol=3)
rownames(m)<-c("100","250")
colnames(m)<-c("0","100","200")
print(m)
#To find P(Y>=100)
prob<-m[1,2]+m[1,3]+m[2,2]+m[2,3]
print(paste("P(Y>=100)=",prob)) |
#' Print an lvec
#'
#' @param x \code{\link{lvec}} to print.
#' @param ... unused
#'
#' @return
#' Returns \code{x} invisibly.
#'
#' @export
print.lvec <- function(x, ...) {
l <- length(x)
t <- lvec_type(x)
cat(t, " lvec of length ", format(l, scientific = FALSE, big.mark=","),
":\n", sep="")
if (l < 20) ... | /R/print.R | no_license | djvanderlaan/lvec | R | false | false | 1,862 | r |
#' Print an lvec
#'
#' @param x \code{\link{lvec}} to print.
#' @param ... unused
#'
#' @return
#' Returns \code{x} invisibly.
#'
#' @export
print.lvec <- function(x, ...) {
l <- length(x)
t <- lvec_type(x)
cat(t, " lvec of length ", format(l, scientific = FALSE, big.mark=","),
":\n", sep="")
if (l < 20) ... |
#!/usr/bin/env Rscript
library(mgc)
library(reshape2)
library(ggplot2)
plot_sim_func <- function(X, Y, Xf, Yf, name, geom='line') {
if (!is.null(dim(Y))) {
Y <- Y[, 1]
Yf <- Yf[, 1]
}
if (geom == 'points') {
funcgeom <- geom_point
} else {
funcgeom <- geom_line
}
data <- data.frame(x1=X[,1],... | /MGC-tests/MGC-test.R | no_license | pmyers16/ndd-2018 | R | false | false | 1,897 | r | #!/usr/bin/env Rscript
library(mgc)
library(reshape2)
library(ggplot2)
plot_sim_func <- function(X, Y, Xf, Yf, name, geom='line') {
if (!is.null(dim(Y))) {
Y <- Y[, 1]
Yf <- Yf[, 1]
}
if (geom == 'points') {
funcgeom <- geom_point
} else {
funcgeom <- geom_line
}
data <- data.frame(x1=X[,1],... |
library(utils)
library(kableExtra)
library(combinat)
library(tinytex)
library(MASS)
##trab amostragem
# Trabalho 1
## Tabela 1
x1 <- c("y1", "y2", "y3", "y4", "y5", "y6")
y1 <- c(2, 4, 5, 7, 8, 9)
df1 <- data.frame(x = x1, y = y1)
t1_1 <- knitr::kable(df1, align = 'clc', format = "markdown",
col.n... | /2018-2/Amostragem/script_amostragem.R | no_license | jayme-jr/Backups | R | false | false | 6,332 | r | library(utils)
library(kableExtra)
library(combinat)
library(tinytex)
library(MASS)
##trab amostragem
# Trabalho 1
## Tabela 1
x1 <- c("y1", "y2", "y3", "y4", "y5", "y6")
y1 <- c(2, 4, 5, 7, 8, 9)
df1 <- data.frame(x = x1, y = y1)
t1_1 <- knitr::kable(df1, align = 'clc', format = "markdown",
col.n... |
# Load the libraries
library(arules)
library(arulesViz)
library(datasets)
# Load the data set
data(Groceries)
summary(Groceries)
# Create an item frequency plot for the top 20 items
itemFrequencyPlot(Groceries,topN=20,type="absolute")
#Applying Apriori Algo and rules
rules <- apriori(Groceries,parameter... | /Apriori.R | no_license | lifeisgood15/Sales-Prediction-using-customer-data | R | false | false | 628 | r | # Load the libraries
library(arules)
library(arulesViz)
library(datasets)
# Load the data set
data(Groceries)
summary(Groceries)
# Create an item frequency plot for the top 20 items
itemFrequencyPlot(Groceries,topN=20,type="absolute")
#Applying Apriori Algo and rules
rules <- apriori(Groceries,parameter... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ip_to_integer.R
\name{ip_to_integer}
\alias{ip_to_integer}
\alias{integer_to_ip}
\title{Represent address as integer}
\usage{
ip_to_integer(x)
integer_to_ip(x, is_ipv6 = NULL)
}
\arguments{
\item{x}{\itemize{
\item \code{ip_to_integer()}: An... | /man/ip_to_integer.Rd | permissive | davidchall/ipaddress | R | false | true | 1,979 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ip_to_integer.R
\name{ip_to_integer}
\alias{ip_to_integer}
\alias{integer_to_ip}
\title{Represent address as integer}
\usage{
ip_to_integer(x)
integer_to_ip(x, is_ipv6 = NULL)
}
\arguments{
\item{x}{\itemize{
\item \code{ip_to_integer()}: An... |
load('who.rda')
middle.east.arab<-c(19,72,109,110,117,121,126,129,169,
171,199,222,237,252)
a<-middle.east.arab
idx=sort(as.character(who$country),index.return=TRUE)
arab.pop=data.frame(country=who$country[idx$ix][a],
pop=who$pop[idx$ix][a])
arab.pop$pop=as.integer(arab.pop$pop) | /scripts/ch04/exercise-WHO-population-Arab.r | no_license | StefanoCiotti/MyProgectsFirst | R | false | false | 285 | r | load('who.rda')
middle.east.arab<-c(19,72,109,110,117,121,126,129,169,
171,199,222,237,252)
a<-middle.east.arab
idx=sort(as.character(who$country),index.return=TRUE)
arab.pop=data.frame(country=who$country[idx$ix][a],
pop=who$pop[idx$ix][a])
arab.pop$pop=as.integer(arab.pop$pop) |
# test_records.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for Zenodo record operations
#=======================
require(zen4R, quietly = TRUE)
require(testthat)
context("records")
test_that("create empty record - with pre-reserved DOI",{
newRec <- ZENODO$createEmptyRecord... | /tests/testthat/test_records.R | permissive | mpadge/zen4R | R | false | false | 7,467 | r | # test_records.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for Zenodo record operations
#=======================
require(zen4R, quietly = TRUE)
require(testthat)
context("records")
test_that("create empty record - with pre-reserved DOI",{
newRec <- ZENODO$createEmptyRecord... |
#!/usr/bin/Rscript
library(ggplot2)
library(methods)
# data1=read.table('p9.dosage',header=T)
# data2=read.table('pheno.csv',header=T)
# data = merge(data1,data2,by='IID')
# data_features = subset(data,select=c(AX.83389438,AX.39912161,AX.31642001,
# AX.31642169,AX.11541856,AX.115... | /pcsk9/select_SNP.R | no_license | heichiyidui/dev | R | false | false | 3,703 | r | #!/usr/bin/Rscript
library(ggplot2)
library(methods)
# data1=read.table('p9.dosage',header=T)
# data2=read.table('pheno.csv',header=T)
# data = merge(data1,data2,by='IID')
# data_features = subset(data,select=c(AX.83389438,AX.39912161,AX.31642001,
# AX.31642169,AX.11541856,AX.115... |
# ----------------------------------------------------------------------------------------------
# ---------------------------------------- Preparation -----------------------------------------
# ----------------------------------------------------------------------------------------------
# Install and load required ... | /code/6_1.R | no_license | PMSchulze/German-MP-Twitter | R | false | false | 16,098 | r | # ----------------------------------------------------------------------------------------------
# ---------------------------------------- Preparation -----------------------------------------
# ----------------------------------------------------------------------------------------------
# Install and load required ... |
library(ggrepel)
# Earlier we compared 2 methods (guessing vs height cutoff),
# while we considered multiple approaches for height cutoff, we only tackled one approach for guessing (p = 0.5)
# To see the difference b/w diff. approaches for diff. models, we use Receiver Operating Characteristic (ROC) curve
# The ROC c... | /8_machine_learning/2_machine_learning_basics/4_ROC_and_precision_recall_curves/notes.R | no_license | marc-haddad/data-science-cert-journey | R | false | false | 3,108 | r | library(ggrepel)
# Earlier we compared 2 methods (guessing vs height cutoff),
# while we considered multiple approaches for height cutoff, we only tackled one approach for guessing (p = 0.5)
# To see the difference b/w diff. approaches for diff. models, we use Receiver Operating Characteristic (ROC) curve
# The ROC c... |
# BayesPrev.
# Copyright (C) 2013, David Foxcroft
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is... | /Bayes_Workhorse.R | no_license | davidfoxcroft/AUDIT_Bayes | R | false | false | 7,923 | r | # BayesPrev.
# Copyright (C) 2013, David Foxcroft
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is... |
#' Generates a plot of issues over time.
#' @param petitions a data frame of petitions
#' @importFrom ggplot2 ggplot aes geom_point labs
#' @export
#' @examples
#' data(petitions)
#' plot_issues_over_time(petitions)
plot_issues_over_time <- function(petitions) {
issues <- melt_issues(petitions)
ggplot(
issues... | /R/plot_issues_over_time.r | no_license | gregelin/r_we_the_people | R | false | false | 485 | r | #' Generates a plot of issues over time.
#' @param petitions a data frame of petitions
#' @importFrom ggplot2 ggplot aes geom_point labs
#' @export
#' @examples
#' data(petitions)
#' plot_issues_over_time(petitions)
plot_issues_over_time <- function(petitions) {
issues <- melt_issues(petitions)
ggplot(
issues... |
library(shiny)
library(fPortfolio)
use_original_frontierPlot = TRUE # source file my-fpoints.R is NOT needed
## use_original_frontierPlot = FALSE # source file my-fpoints.R is needed
if (use_original_frontierPlot){
## Set myfrontierPlot to the original frontierPlot in fPortfolio
myfrontierPlot = frontierPlot
}e... | /Resources/EfficientFrontier/server.r | permissive | Karagul/RShinyEfficientFrontier | R | false | false | 3,859 | r | library(shiny)
library(fPortfolio)
use_original_frontierPlot = TRUE # source file my-fpoints.R is NOT needed
## use_original_frontierPlot = FALSE # source file my-fpoints.R is needed
if (use_original_frontierPlot){
## Set myfrontierPlot to the original frontierPlot in fPortfolio
myfrontierPlot = frontierPlot
}e... |
context("shadow shift")
test_that("shadow_shift returns NULL when given NULL",{
expect_null(shadow_shift(NULL))
})
test_that("shadow_shift returns an error when given the wrong kind of object",{
expect_error(shadow_shift("c"))
expect_error(shadow_shift(iris$Species))
expect_error(shadow_shift(as.character(iri... | /tests/testthat/test-shadow-shift.R | no_license | umeshach/naniar | R | false | false | 1,648 | r | context("shadow shift")
test_that("shadow_shift returns NULL when given NULL",{
expect_null(shadow_shift(NULL))
})
test_that("shadow_shift returns an error when given the wrong kind of object",{
expect_error(shadow_shift("c"))
expect_error(shadow_shift(iris$Species))
expect_error(shadow_shift(as.character(iri... |
##8月分布的所有文章,统计每个频道发布了多少篇文章
##然后通过频道名查询另外一个总发布文章量的表格里面,相同的频道名发布了多少文章,导出数据
setwd("~/Documents/GitHub/R programming/Practice_2")
library(readr)
#读取文件
all_data <- read_csv("./8月发布文章.csv")
#重命名所有列
names(all_data)<-c("editer","author","title","url","channel","property","pub_time")
#提取8月发布文章量表格里,每个频道发布的文章量
pro_fre<-as.data.f... | /Rprogramming/Practice_2/practice_2.R | no_license | hsiaoyang/datasciencecoursera | R | false | false | 859 | r | ##8月分布的所有文章,统计每个频道发布了多少篇文章
##然后通过频道名查询另外一个总发布文章量的表格里面,相同的频道名发布了多少文章,导出数据
setwd("~/Documents/GitHub/R programming/Practice_2")
library(readr)
#读取文件
all_data <- read_csv("./8月发布文章.csv")
#重命名所有列
names(all_data)<-c("editer","author","title","url","channel","property","pub_time")
#提取8月发布文章量表格里,每个频道发布的文章量
pro_fre<-as.data.f... |
#' generate_hotspot_model
#'
#' Uses the parameters returned by \code{fit_hotspot_model} to generate
#' rank-scale distributions both of raw values and associated spatial
#' autocorrelation statistics.
#'
#' @param n Number of observations to generate
#' @param alpha Strength of spatial autocorrelation
#' @param sd0 S... | /R/generate-hotspot-model.R | no_license | mpadge/hotspotr | R | false | false | 1,599 | r | #' generate_hotspot_model
#'
#' Uses the parameters returned by \code{fit_hotspot_model} to generate
#' rank-scale distributions both of raw values and associated spatial
#' autocorrelation statistics.
#'
#' @param n Number of observations to generate
#' @param alpha Strength of spatial autocorrelation
#' @param sd0 S... |
## These tests address construction and querying of the graph structure
## test-getDependencies has some more basic tests.
source(system.file(file.path('tests', 'test_utils.R'), package = 'nimble'))
RwarnLevel <- options('warn')$warn
options(warn = -1)
nimbleVerboseSetting <- nimbleOptions('verbose')
nimbleOptions(ver... | /packages/nimble/inst/tests/test-graphStructure.R | no_license | nemochina2008/nimble | R | false | false | 6,174 | r | ## These tests address construction and querying of the graph structure
## test-getDependencies has some more basic tests.
source(system.file(file.path('tests', 'test_utils.R'), package = 'nimble'))
RwarnLevel <- options('warn')$warn
options(warn = -1)
nimbleVerboseSetting <- nimbleOptions('verbose')
nimbleOptions(ver... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Getting probability"),
tags$div(class="header", checked=NA,
tags... | /ui.R | no_license | carlosjm007/Data-products-proyect | R | false | false | 1,429 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Getting probability"),
tags$div(class="header", checked=NA,
tags... |
#' Semi-annual and annual hydrological data
#'
#' Downloading hydrological data for the semi-annual and annual period
#' available in the danepubliczne.imgw.pl collection
#'
#' @param year vector of years (e.g., 1966:2000)
#' @param coords add coordinates of the stations (logical value TRUE or FALSE)
#' @param value ty... | /R/hydro_imgw_annual.R | permissive | SeoncheolPark/climate | R | false | false | 3,776 | r | #' Semi-annual and annual hydrological data
#'
#' Downloading hydrological data for the semi-annual and annual period
#' available in the danepubliczne.imgw.pl collection
#'
#' @param year vector of years (e.g., 1966:2000)
#' @param coords add coordinates of the stations (logical value TRUE or FALSE)
#' @param value ty... |
library(matlib)
### Name: vandermode
### Title: Vandermode Matrix
### Aliases: vandermode
### ** Examples
vandermode(1:5, 4)
| /data/genthat_extracted_code/matlib/examples/vandermode.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 132 | r | library(matlib)
### Name: vandermode
### Title: Vandermode Matrix
### Aliases: vandermode
### ** Examples
vandermode(1:5, 4)
|
library(dplyr)
library(ggplot2)
#Reading the data
# This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Subsetting Baltimore City and LA
BALA <- filter(NEI, fips=="24510"|fips == "06037")
#Subsetting motor vehicles by "O... | /4. Exploratory Data Analysis/Course Project 2/plot6.R | no_license | jantonz/DataScience | R | false | false | 1,056 | r | library(dplyr)
library(ggplot2)
#Reading the data
# This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Subsetting Baltimore City and LA
BALA <- filter(NEI, fips=="24510"|fips == "06037")
#Subsetting motor vehicles by "O... |
thisFile<-paste(DIR$'Base',"reports\\(01)BaseReport\\targetAudience.csv",sep="")
ta<-read.csv(thisFile,sep=",")
sort(table(ta$'Journals.published.in'),decreasing=TRUE)[1:5]
# Fish and Fisheries ICES Journal of Marine Science
# 7 7
# PLoS ONE Ca... | /(01)Setting_up/targetAudience.R | no_license | mcgregorv/AtlantisRscripts | R | false | false | 457 | r | thisFile<-paste(DIR$'Base',"reports\\(01)BaseReport\\targetAudience.csv",sep="")
ta<-read.csv(thisFile,sep=",")
sort(table(ta$'Journals.published.in'),decreasing=TRUE)[1:5]
# Fish and Fisheries ICES Journal of Marine Science
# 7 7
# PLoS ONE Ca... |
plot2 <- function(){
## Load library
library(data.table)
# File to read in working directory.
## Read header
header <- fread("./household_power_consumption.txt", nrows = 1, header = FALSE)
## Read dataset dates 1/2/2007, 2/2/2007
hpc <- fread("grep ^[1-2]/2/2007 ./household_power_consumption.txt"... | /plot2.R | no_license | miniesta4/ExData_Plotting1 | R | false | false | 813 | r | plot2 <- function(){
## Load library
library(data.table)
# File to read in working directory.
## Read header
header <- fread("./household_power_consumption.txt", nrows = 1, header = FALSE)
## Read dataset dates 1/2/2007, 2/2/2007
hpc <- fread("grep ^[1-2]/2/2007 ./household_power_consumption.txt"... |
library(ggplot2)
library(ggthemes)
theme_set(theme_economist())
data(diamonds)
# Your first task is to create a
# scatterplot of price vs x.
# using the ggplot syntax.
ggplot(aes(x=x, y=price), data=diamonds) + geom_point() + xlim(3,12)+ geom_smooth()
model <- loess(price ~ x, data=diamonds)
predict(model, 5.7)
# Cor... | /Data-Analysis-with-R/EDA_Lesson4_PS.R | no_license | FrankRuns/Udacity | R | false | false | 15,177 | r | library(ggplot2)
library(ggthemes)
theme_set(theme_economist())
data(diamonds)
# Your first task is to create a
# scatterplot of price vs x.
# using the ggplot syntax.
ggplot(aes(x=x, y=price), data=diamonds) + geom_point() + xlim(3,12)+ geom_smooth()
model <- loess(price ~ x, data=diamonds)
predict(model, 5.7)
# Cor... |
#' Prepares a pairs plot and invokes a callback for each actual plot
#'
#' This function differs from \link{\code{pairs}} in that it only sets up the
#' plot window, it doesn’t itself manage the data. This makes it more flexible.
#' @param axes vector of labels denoting combinations to plot
#' @param upper function tha... | /common/scripts/plot-pairwise.R | permissive | klmr/trna | R | false | false | 2,475 | r | #' Prepares a pairs plot and invokes a callback for each actual plot
#'
#' This function differs from \link{\code{pairs}} in that it only sets up the
#' plot window, it doesn’t itself manage the data. This makes it more flexible.
#' @param axes vector of labels denoting combinations to plot
#' @param upper function tha... |
library(rbace)
library(stringr)
# get_papers
#
# Params:
#
# * query: search query
# * params: parameters for the search in JSON format
# * from: publication date lower bound in the form YYYY-MM-DD
# * to: publication date upper bound in the form YYYY-MM-DD
# * article_types: in the form of an array of identi... | /server/preprocessing/other-scripts/base.R | permissive | sbalci/Headstart | R | false | false | 10,667 | r | library(rbace)
library(stringr)
# get_papers
#
# Params:
#
# * query: search query
# * params: parameters for the search in JSON format
# * from: publication date lower bound in the form YYYY-MM-DD
# * to: publication date upper bound in the form YYYY-MM-DD
# * article_types: in the form of an array of identi... |
library(shiny)
library(shinyWidgets)
library(leaflet)
library(leaflet.extras)
library(raster)
library(rgeos)
library(sp)
library(DT)
library(htmlwidgets)
library(dplyr)
library(ggplot2)
library(grDevices)
library(Bchron)
library(rcarbon)
library(bibtex)
source("functions.R")
# note: intCal is 'intcal20'
lcul_col <- l... | /time/c14/neonet/archives/shinyapp_pisa/(archives)/app_1_1.R | no_license | zoometh/Rdev | R | false | false | 36,139 | r | library(shiny)
library(shinyWidgets)
library(leaflet)
library(leaflet.extras)
library(raster)
library(rgeos)
library(sp)
library(DT)
library(htmlwidgets)
library(dplyr)
library(ggplot2)
library(grDevices)
library(Bchron)
library(rcarbon)
library(bibtex)
source("functions.R")
# note: intCal is 'intcal20'
lcul_col <- l... |
\name{bigRR}
\alias{bigRR}
\alias{bigRR.default}
\alias{bigRR.formula}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Fitting big ridge regression}
\description{
Function fits big ridge regression with special computational advantage for the cases when number of shrinkage parameters exce... | /man/bigRR.Rd | no_license | DPCscience/bigRR | R | false | false | 7,380 | rd | \name{bigRR}
\alias{bigRR}
\alias{bigRR.default}
\alias{bigRR.formula}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Fitting big ridge regression}
\description{
Function fits big ridge regression with special computational advantage for the cases when number of shrinkage parameters exce... |
#' Bimodal Gumbel: Density Function
#'
#' @param x Domain.
#' @param mu First location parameter.
#' @param sigma Scale parameter.
#' @param delta Second location parameter.
#' @return Vector.
#' @examples
#' dbgumbel(x = 0, mu = -2, sigma = 1, delta = -1)
#' curve(dbgumbel(x, mu = -2, sigma = 1, delta = -1), xlim = c(... | /R/dbgumbel.R | permissive | pcbrom/bgumbel | R | false | false | 849 | r | #' Bimodal Gumbel: Density Function
#'
#' @param x Domain.
#' @param mu First location parameter.
#' @param sigma Scale parameter.
#' @param delta Second location parameter.
#' @return Vector.
#' @examples
#' dbgumbel(x = 0, mu = -2, sigma = 1, delta = -1)
#' curve(dbgumbel(x, mu = -2, sigma = 1, delta = -1), xlim = c(... |
source('hillConstants.R')
directory <- 'data/'
baseFile <- paste(c(directory,'baseData.csv'),collapse="")
intFilePrefix <- directory
intFileSuffix <- '.csv'
#Intervention string details:
# inc/red --> increase/reduce
# EnLTBI/Imm/LTBItrmt/Trans --> Entering LTBI, Immigration, LTBI Treatment... | /in_progress/models/costBenefitAnalysis/scriptsForPaper/interventionConfig.R | no_license | mmcdermott/disease-modeling | R | false | false | 3,316 | r | source('hillConstants.R')
directory <- 'data/'
baseFile <- paste(c(directory,'baseData.csv'),collapse="")
intFilePrefix <- directory
intFileSuffix <- '.csv'
#Intervention string details:
# inc/red --> increase/reduce
# EnLTBI/Imm/LTBItrmt/Trans --> Entering LTBI, Immigration, LTBI Treatment... |
options(stringsAsFactors = FALSE)
empile<-function(...){
N<-unique(unlist(lapply(list(...),names)))
result<-NULL
for(DF in list(...)){
x<-as.data.frame(lapply(N,function(n)if(n %in% colnames(DF)) DF[,n]
else NA))
names(x)<-N
result<-rbind(result,x)
}
result
}
##### read in format... | /Marie/Convert_STICS_8_to_5.R | no_license | kevinwolz/hisafe_R_code | R | false | false | 25,165 | r | options(stringsAsFactors = FALSE)
empile<-function(...){
N<-unique(unlist(lapply(list(...),names)))
result<-NULL
for(DF in list(...)){
x<-as.data.frame(lapply(N,function(n)if(n %in% colnames(DF)) DF[,n]
else NA))
names(x)<-N
result<-rbind(result,x)
}
result
}
##### read in format... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gh3.R
\name{gh_rate_limit_get}
\alias{gh_rate_limit_get}
\title{Get your current rate limit status}
\usage{
gh_rate_limit_get(...)
}
\arguments{
\item{...}{Additional parameters to pass to \code{\link[gh]{gh}}. See details.}
}
\description{
N... | /man/gh_rate_limit_get.Rd | permissive | ramnathv/gh3 | R | false | true | 612 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gh3.R
\name{gh_rate_limit_get}
\alias{gh_rate_limit_get}
\title{Get your current rate limit status}
\usage{
gh_rate_limit_get(...)
}
\arguments{
\item{...}{Additional parameters to pass to \code{\link[gh]{gh}}. See details.}
}
\description{
N... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expData.R
\docType{data}
\name{h_c}
\alias{h_c}
\title{GO-term annotation database from the cellular component ontology for the human genes}
\format{Not Available}
\source{
\url{https://www.ebi.ac.uk/GOA/downloads}
}
\usage{
h_c
}
\descriptio... | /man/h_c.Rd | no_license | tastanlab/NoRCE | R | false | true | 452 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expData.R
\docType{data}
\name{h_c}
\alias{h_c}
\title{GO-term annotation database from the cellular component ontology for the human genes}
\format{Not Available}
\source{
\url{https://www.ebi.ac.uk/GOA/downloads}
}
\usage{
h_c
}
\descriptio... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aaGenerics.R
\name{filterBF}
\alias{filterBF}
\title{Filter the elements of an object according to some pre-specified criteria}
\usage{
filterBF(x, name, perl = FALSE, fixed = FALSE, ...)
}
\arguments{
\item{x}{object}
\item{name}... | /man/filterBF.Rd | no_license | cran/BayesFactor | R | false | true | 741 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aaGenerics.R
\name{filterBF}
\alias{filterBF}
\title{Filter the elements of an object according to some pre-specified criteria}
\usage{
filterBF(x, name, perl = FALSE, fixed = FALSE, ...)
}
\arguments{
\item{x}{object}
\item{name}... |
install.packages(c("FactoMineR", "factoextra"))
library("FactoMineR")
library("factoextra")
triageData <- read.csv("G:/David/JCU/MA5854/ED_Patients_Data.csv", header = T, sep = ",")
triageData[] <- lapply(triageData, as.numeric)
#convert NA to 0
triageData[is.na(triageData)] = 0
str(triageData)
#remove th... | /EDtriage_dataPCA.R | no_license | Daskindata/ED-Triage-Model | R | false | false | 1,911 | r | install.packages(c("FactoMineR", "factoextra"))
library("FactoMineR")
library("factoextra")
triageData <- read.csv("G:/David/JCU/MA5854/ED_Patients_Data.csv", header = T, sep = ",")
triageData[] <- lapply(triageData, as.numeric)
#convert NA to 0
triageData[is.na(triageData)] = 0
str(triageData)
#remove th... |
spocc_download = occ(query='Apodemus sylvaticus',from='gbif', limit = 2000)
library(spocc)
library(dismo)
wc = getData('worldclim', var='bio', res=5)
df = as.data.frame(occ2df(spocc_download$gbif))
library(ENMeval)
library(raster)
ext = extent(c(-21, 54, 36, 68))
predictors = crop(wc,ext)
occdat <- occ2df(spocc_downloa... | /mouse spocc.R | no_license | salves8790/mouse-bioinformatics | R | false | false | 821 | r | spocc_download = occ(query='Apodemus sylvaticus',from='gbif', limit = 2000)
library(spocc)
library(dismo)
wc = getData('worldclim', var='bio', res=5)
df = as.data.frame(occ2df(spocc_download$gbif))
library(ENMeval)
library(raster)
ext = extent(c(-21, 54, 36, 68))
predictors = crop(wc,ext)
occdat <- occ2df(spocc_downloa... |
#' Heuristic algorithms for building FFTs originally developed by Martignon, Katsikopoulos & Woike (2008)
#'
#' @param formula formula. A formula specifying a logical criterion as a function of 1 or more predictors.
#' @param data dataframe. A training dataset.
#' @param max.levels integer. The maximum number of levels... | /R/heuristic_algorithm.R | no_license | csantill/FFTrees | R | false | false | 9,730 | r | #' Heuristic algorithms for building FFTs originally developed by Martignon, Katsikopoulos & Woike (2008)
#'
#' @param formula formula. A formula specifying a logical criterion as a function of 1 or more predictors.
#' @param data dataframe. A training dataset.
#' @param max.levels integer. The maximum number of levels... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
pml_table <- function(x, style_id, col_width, row_height, first_row = TRUE, last_row = FALSE, first_column = FALSE, last_column = FALSE, header = TRUE) {
.Call(`_officer_pml_table`, x, styl... | /R/RcppExports.R | no_license | rishi-gupta-md/officer | R | false | false | 1,925 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
pml_table <- function(x, style_id, col_width, row_height, first_row = TRUE, last_row = FALSE, first_column = FALSE, last_column = FALSE, header = TRUE) {
.Call(`_officer_pml_table`, x, styl... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{icols}
\alias{icols}
\title{Iterator for column number of a data frame}
\usage{
icols(df)
}
\arguments{
\item{df}{a data frame}
}
\description{
Iterator for column number of a data frame
}
| /man/icols.Rd | permissive | arturochian/pforeach | R | false | false | 249 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{icols}
\alias{icols}
\title{Iterator for column number of a data frame}
\usage{
icols(df)
}
\arguments{
\item{df}{a data frame}
}
\description{
Iterator for column number of a data frame
}
|
#####Territory size by Salmon biomass#####
##one year before or average of 3 year
counter<-read.csv("Countersingpartial.csv", header = TRUE, as.is = TRUE)
str(counter)
counter$Stream<-as.factor(counter$Stream)
counter$counter.bybird<-counter$Total.countersing/counter$Num.bird
counter$Salmon.log.biomass<-log(count... | /Analysis/Countersing.R | no_license | KirstenAW/Rproj_Territory_Chp1 | R | false | false | 2,735 | r | #####Territory size by Salmon biomass#####
##one year before or average of 3 year
counter<-read.csv("Countersingpartial.csv", header = TRUE, as.is = TRUE)
str(counter)
counter$Stream<-as.factor(counter$Stream)
counter$counter.bybird<-counter$Total.countersing/counter$Num.bird
counter$Salmon.log.biomass<-log(count... |
#!/usr/bin/env R
#### Script demonstrating the use of the apply() function
# delete everything
rm(list=ls(all=TRUE))
## Build a random matrix
M <- matrix(rnorm(100), 10, 10)
#Take the mean of each row
RowMeans <- apply(M, 1, mean)
print(RowMeans)
#Take the variance of each row
RowVars <- apply(M, 1, var)
print(Row... | /Week3/Code/Apply1.R | no_license | elinfalla/CMEECourseWork | R | false | false | 389 | r | #!/usr/bin/env R
#### Script demonstrating the use of the apply() function
# delete everything
rm(list=ls(all=TRUE))
## Build a random matrix
M <- matrix(rnorm(100), 10, 10)
#Take the mean of each row
RowMeans <- apply(M, 1, mean)
print(RowMeans)
#Take the variance of each row
RowVars <- apply(M, 1, var)
print(Row... |
## if .rda file does not exist, download it
if (!file.exists('./data/household_power_consumption_feb.Rda')) {
## if data/ does not exist, create it
if (!file.exists('./data')) {
dir.create('./data')
}
## if zip file does not exist, download it
if (!file.exists('./data/household_power_consump... | /data4.R | no_license | sgopalan/ExData_Plotting1 | R | false | false | 2,370 | r | ## if .rda file does not exist, download it
if (!file.exists('./data/household_power_consumption_feb.Rda')) {
## if data/ does not exist, create it
if (!file.exists('./data')) {
dir.create('./data')
}
## if zip file does not exist, download it
if (!file.exists('./data/household_power_consump... |
#Here is some stuff
| /afile.R | no_license | Sages11/sasap_test2 | R | false | false | 21 | r | #Here is some stuff
|
#Brian Holliday
#Professor Li
#Intro to Data Mining
#13 May 2020
#Project 6d
#Problem 1
dat <- read.csv('Project6 (2).csv', sep = ',', header = TRUE)
dat <- na.omit(dat)
head(dat)
names(dat) <- c('x1', 'x2', 'x3', 'x4', 'x5')
head(dat)
A <- data.frame(cbind(dat$x1, dat$x2, dat$x4))
name... | /Project 6/Part 4/Project 6 Part 4.r | no_license | blh119/Intro-to-Data-Mining | R | false | false | 1,265 | r | #Brian Holliday
#Professor Li
#Intro to Data Mining
#13 May 2020
#Project 6d
#Problem 1
dat <- read.csv('Project6 (2).csv', sep = ',', header = TRUE)
dat <- na.omit(dat)
head(dat)
names(dat) <- c('x1', 'x2', 'x3', 'x4', 'x5')
head(dat)
A <- data.frame(cbind(dat$x1, dat$x2, dat$x4))
name... |
### test to add in sample DNA ###
x <- structure(c("55548", "43297", "35309", "34468", "AATTCAATGCTCGGGAAGCAAGGAAAGCTGGGGACCAACTTCTCTTGGAGACATGAGCTTAGTGCAGTTAGATCGGAAGAGCA", "AATTCCTAAAACACCAATCAAGTTGGTGTTGCTAATTTCAACACCAACTTGTTGATCTTCACGTTCACAACCGTCTTCACGTT", "AATTCACCACCACCACTAGCATACCATCCACCTCCATCACCACCACCGGTTAAGATCG... | /TajD_script.R | no_license | mikeod38/R_evo | R | false | false | 640 | r | ### test to add in sample DNA ###
x <- structure(c("55548", "43297", "35309", "34468", "AATTCAATGCTCGGGAAGCAAGGAAAGCTGGGGACCAACTTCTCTTGGAGACATGAGCTTAGTGCAGTTAGATCGGAAGAGCA", "AATTCCTAAAACACCAATCAAGTTGGTGTTGCTAATTTCAACACCAACTTGTTGATCTTCACGTTCACAACCGTCTTCACGTT", "AATTCACCACCACCACTAGCATACCATCCACCTCCATCACCACCACCGGTTAAGATCG... |
library(RNeXML)
### Name: nexml-class
### Title: Class representing a NeXML document
### Aliases: nexml-class nexml
### ** Examples
nex <- nexml() # a nexml object with no further content
nex <- new("nexml") # accomplishes the same thing
nex@generator
length(nex@trees)
data(bird.orders)
nex <- as(bird.orders, "nex... | /data/genthat_extracted_code/RNeXML/examples/nexml-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 359 | r | library(RNeXML)
### Name: nexml-class
### Title: Class representing a NeXML document
### Aliases: nexml-class nexml
### ** Examples
nex <- nexml() # a nexml object with no further content
nex <- new("nexml") # accomplishes the same thing
nex@generator
length(nex@trees)
data(bird.orders)
nex <- as(bird.orders, "nex... |
dtr<-fread("household_power_consumption.txt",na.strings=c("?",NA,"NULL"))
dt<- dtr[dtr$Date %in% c("1/2/2007","2/2/2007"), ]
dt$dateTime <-as.POSIXct(paste(dt$Date, dt$Time),format="%d/%m/%Y %H:%M:%S",tz=Sys.timezone())
#par(mfrow=c(1,1))
#plot 1
hist(dt$Global_active_power,main="Global Active Power", xlab = "Gloabal A... | /plot1.r | no_license | f-benoit/ExData_Plotting1 | R | false | false | 434 | r | dtr<-fread("household_power_consumption.txt",na.strings=c("?",NA,"NULL"))
dt<- dtr[dtr$Date %in% c("1/2/2007","2/2/2007"), ]
dt$dateTime <-as.POSIXct(paste(dt$Date, dt$Time),format="%d/%m/%Y %H:%M:%S",tz=Sys.timezone())
#par(mfrow=c(1,1))
#plot 1
hist(dt$Global_active_power,main="Global Active Power", xlab = "Gloabal A... |
library(magick)
f <- list.files(pattern = "png")
image_write(image_trim(image_read(f)), f)
| /PyDataCardiffDec2018/image_trim.R | no_license | forwards/presentations | R | false | false | 91 | r | library(magick)
f <- list.files(pattern = "png")
image_write(image_trim(image_read(f)), f)
|
angle_intersection_calculation <- function(values, gon, choice = FALSE){
options(digits = 10)
if(choice == TRUE){
values = read.table(file = values, header = FALSE, sep = " ", dec = ".")
}
X_A = values[1,1]
Y_A = values[1,2]
X_B = values[2,1]
Y_B = values[2,2]
omega_A = values[3,1]
omega_B = ... | /GEOMASS_SOURCE/R/angle_intersection_calculation.R | no_license | MichalKarasek/R | R | false | false | 963 | r | angle_intersection_calculation <- function(values, gon, choice = FALSE){
options(digits = 10)
if(choice == TRUE){
values = read.table(file = values, header = FALSE, sep = " ", dec = ".")
}
X_A = values[1,1]
Y_A = values[1,2]
X_B = values[2,1]
Y_B = values[2,2]
omega_A = values[3,1]
omega_B = ... |
### Author: Shah Ayub Quadri ###
### Scholarship Test Problem on banking ###
#Visualisation
# 1. Density plots of var_15, Num_var4, Var38
#Preprocessing steps
# 1. check for null values
# 2. remove those columns which are totally null reduce to 303 from 371
# 3.
rm(list = ls())
setwd("C:/Users/quadris/Desktop/My L... | /Scholarship Test/TRY_out.R | no_license | AyubQuadri/Backup | R | false | false | 7,462 | r | ### Author: Shah Ayub Quadri ###
### Scholarship Test Problem on banking ###
#Visualisation
# 1. Density plots of var_15, Num_var4, Var38
#Preprocessing steps
# 1. check for null values
# 2. remove those columns which are totally null reduce to 303 from 371
# 3.
rm(list = ls())
setwd("C:/Users/quadris/Desktop/My L... |
library(reshape2)
library(ggplot2)
adj_mat <- list.files(path = "bnstruct/", pattern = "*adjmat*", full.names = T)
expr_files <- list.files(path = "bnstruct/", pattern = "*expr.txt", full.names = T)
am <- gsub("_adjmat.txt", "", adj_mat)
ef <- gsub("_expr.txt", "", expr_files)
ef_sel <- expr_files[ef %in% am]
line... | /line_graphs.R | no_license | rajinder4489/protein_complexes | R | false | false | 2,898 | r | library(reshape2)
library(ggplot2)
adj_mat <- list.files(path = "bnstruct/", pattern = "*adjmat*", full.names = T)
expr_files <- list.files(path = "bnstruct/", pattern = "*expr.txt", full.names = T)
am <- gsub("_adjmat.txt", "", adj_mat)
ef <- gsub("_expr.txt", "", expr_files)
ef_sel <- expr_files[ef %in% am]
line... |
#' My first R package: gameday
#'
#' This is so much fun
#'
#' I look forward to writing really neat packages
#' so that I can have all my helper functions in one place
#' and maybe even share them.
#'
#' @docType package
#' @name gameday
NULL
| /R/gameday.R | no_license | kurtis14/gameday | R | false | false | 244 | r | #' My first R package: gameday
#'
#' This is so much fun
#'
#' I look forward to writing really neat packages
#' so that I can have all my helper functions in one place
#' and maybe even share them.
#'
#' @docType package
#' @name gameday
NULL
|
#' rupamb625: A package for aggregating p-values
#'
#' Aggregate a given set of p-values using one of the following four methods:
#' Fisher's, Lancaster's, Stouffer's or Sidak's.
#'
#' @section Functions in rupamb625:
#' \code{\link{fisher}}, \code{\link{lancaster}}, \code{\link{stouffer}}, \code{\link{sidak}}
#'
#' @... | /R/rupamb625.R | no_license | rupambh/rupamb625 | R | false | false | 418 | r |
#' rupamb625: A package for aggregating p-values
#'
#' Aggregate a given set of p-values using one of the following four methods:
#' Fisher's, Lancaster's, Stouffer's or Sidak's.
#'
#' @section Functions in rupamb625:
#' \code{\link{fisher}}, \code{\link{lancaster}}, \code{\link{stouffer}}, \code{\link{sidak}}
#'
#' @... |
#' upside risk, variance and potential of the return distribution
#'
#' Upside Risk is the similar of semideviation taking the return above the
#' Minimum Acceptable Return instead of using the mean return or zero.
#' To calculate it, we take the subset of returns that are more than the target
#' (or Minimum Acceptabl... | /R/UpsideRisk.R | no_license | sanjivkv/PerformanceAnalytics | R | false | false | 4,190 | r | #' upside risk, variance and potential of the return distribution
#'
#' Upside Risk is the similar of semideviation taking the return above the
#' Minimum Acceptable Return instead of using the mean return or zero.
#' To calculate it, we take the subset of returns that are more than the target
#' (or Minimum Acceptabl... |
#!/usr/local/bin/Rscript
# ---------------------------------------------------------------------------- #
# #### prepare_gislayers_for_maps.R ####
# ---------------------------------------------------------------------------- #
# Purpose: prepare selected gis (vector) layers for maps over Europe
# Project: f4p-era5-ana... | /code/harvesting_data_for_final_figures/prepare_gislayers_for_maps.R | no_license | GregDuveiller/f4p-era5-analysis | R | false | false | 2,757 | r | #!/usr/local/bin/Rscript
# ---------------------------------------------------------------------------- #
# #### prepare_gislayers_for_maps.R ####
# ---------------------------------------------------------------------------- #
# Purpose: prepare selected gis (vector) layers for maps over Europe
# Project: f4p-era5-ana... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkFuncs.R
\name{checkFuncs}
\alias{checkFuncs}
\alias{l1chr}
\alias{l1num}
\alias{l1int}
\alias{l1log}
\alias{allSameLength}
\title{Common parameter checks}
\usage{
l1chr(x)
l1num(x)
l1int(x)
l1log(x)
allSameLength(...)
}
\arguments{
\... | /man/checkFuncs.Rd | no_license | daynefiler/dlfUtils | R | false | true | 622 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkFuncs.R
\name{checkFuncs}
\alias{checkFuncs}
\alias{l1chr}
\alias{l1num}
\alias{l1int}
\alias{l1log}
\alias{allSameLength}
\title{Common parameter checks}
\usage{
l1chr(x)
l1num(x)
l1int(x)
l1log(x)
allSameLength(...)
}
\arguments{
\... |
library(beadarrayMSV)
### Name: manualCall
### Title: Interactive calling of genotype for single marker
### Aliases: manualCall
### ** Examples
## Not run:
##D #Read 10 markers into an AlleleSetIllumina object
##D rPath <- system.file("extdata", package="beadarrayMSV")
##D normOpts <- setNormOptions()
##D dataFile... | /data/genthat_extracted_code/beadarrayMSV/examples/manualCall.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,099 | r | library(beadarrayMSV)
### Name: manualCall
### Title: Interactive calling of genotype for single marker
### Aliases: manualCall
### ** Examples
## Not run:
##D #Read 10 markers into an AlleleSetIllumina object
##D rPath <- system.file("extdata", package="beadarrayMSV")
##D normOpts <- setNormOptions()
##D dataFile... |
testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), ExpressionSet = structure(c(1.63064200184954e+212, 1.11558267938731e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.55398... | /myTAI/inst/testfiles/cpp_omitMatrix/AFL_cpp_omitMatrix/cpp_omitMatrix_valgrind_files/1615845415-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,090 | r | testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), ExpressionSet = structure(c(1.63064200184954e+212, 1.11558267938731e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.55398... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as-points.R
\name{as_points}
\alias{as_points}
\title{Convert to point}
\source{
\url{https://twitter.com/andrewheiss/status/1095450321784950785}
}
\usage{
as_points(x, input_unit = "mm")
}
\arguments{
\item{x}{Input.}
\item{input_unit}{Unit... | /man/as_points.Rd | no_license | qindan2008/kpjmisc | R | false | true | 581 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as-points.R
\name{as_points}
\alias{as_points}
\title{Convert to point}
\source{
\url{https://twitter.com/andrewheiss/status/1095450321784950785}
}
\usage{
as_points(x, input_unit = "mm")
}
\arguments{
\item{x}{Input.}
\item{input_unit}{Unit... |
## Course project - Getting and Cleaning Data
## Create one R script called run_analysis.R that does the following:
## 1. Merges the training and the test sets to create one data set.
## 2. Extracts only the measurements on the mean and standard deviation for each measurement.
## 3. Uses descriptive activity names to n... | /run_analysis.R | no_license | bsanavio/GettingAndCleaningData | R | false | false | 3,332 | r | ## Course project - Getting and Cleaning Data
## Create one R script called run_analysis.R that does the following:
## 1. Merges the training and the test sets to create one data set.
## 2. Extracts only the measurements on the mean and standard deviation for each measurement.
## 3. Uses descriptive activity names to n... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3894
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3894
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_2_3_10.unsat.qdimac... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Tentrup/mult-matrix/mult_bool_matrix_2_3_10.unsat/mult_bool_matrix_2_3_10.unsat.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 659 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3894
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3894
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_2_3_10.unsat.qdimac... |
#https://www.youtube.com/watch?v=WxSUsTDcMTg
library(ggplot2)
str(diamonds)
head(diamonds$color)
head(diamonds)
p <- ggplot(diamonds, aes(x = cut, fill = clarity))
p + geom_histogram(stat = "count")
| /ggplot.R | no_license | devri12/ggplot2-practice | R | false | false | 202 | r | #https://www.youtube.com/watch?v=WxSUsTDcMTg
library(ggplot2)
str(diamonds)
head(diamonds$color)
head(diamonds)
p <- ggplot(diamonds, aes(x = cut, fill = clarity))
p + geom_histogram(stat = "count")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.