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 |
|---|---|---|---|---|---|---|---|---|---|
#' Permutation PERFect filtering for microbiome data
#'
#' @description This function filters the provided OTU table X at a test level alpha given a fitted object
#' perfect_perm obtained by running \code{PERFect_perm()} function. \code{PERFect_perm_reorder()} reavaluates taxa
#' significance p-values for a different... | /R/PERFect_perm_reorder.R | no_license | cxquy91/PERFect | R | false | false | 8,732 | r | #' Permutation PERFect filtering for microbiome data
#'
#' @description This function filters the provided OTU table X at a test level alpha given a fitted object
#' perfect_perm obtained by running \code{PERFect_perm()} function. \code{PERFect_perm_reorder()} reavaluates taxa
#' significance p-values for a different... |
library(jsonlite)
library(ggplot2)
#pdf(onefile = FALSE)
pdf(onefile = FALSE, width=21/2.54, height=7/2.54,
pointsize=10)
names<-c("treatment","object","execution","dependentVariable" ,"min","mean","max")
df<-data.frame(replicate(4,character(0)), replicate(3,numeric(0)))
names(df)<-names
originalDataFile<-"orig... | /cashew/orbits/results/replication.R | no_license | eneiascs/dsm-experiments-evaluation | R | false | false | 61,098 | r |
library(jsonlite)
library(ggplot2)
#pdf(onefile = FALSE)
pdf(onefile = FALSE, width=21/2.54, height=7/2.54,
pointsize=10)
names<-c("treatment","object","execution","dependentVariable" ,"min","mean","max")
df<-data.frame(replicate(4,character(0)), replicate(3,numeric(0)))
names(df)<-names
originalDataFile<-"orig... |
#' Serialize a list into text
#'
#' This function acts as a text-serializer for lists. One use case is
#'
#' @param x list, values to be serialized
#' @param delim character, delimiter to collapse mutiple-value members
#' @param locale list, directs the formatting functions for each class
#'
#' @re... | /R/serialize_list.R | no_license | ijlyttle/srlze | R | false | false | 911 | r | #' Serialize a list into text
#'
#' This function acts as a text-serializer for lists. One use case is
#'
#' @param x list, values to be serialized
#' @param delim character, delimiter to collapse mutiple-value members
#' @param locale list, directs the formatting functions for each class
#'
#' @re... |
args = commandArgs(trailingOnly=TRUE)
library(ggplot2)
library(ggthemes)
library(RColorBrewer)
library(plyr)
library(foreach)
library(gridExtra)
library(Hmisc)
library(reshape2)
#' Make sashimi-esque plot with ggplot2
#'
#' Shows only junction reads and can optionally show splicing variation across groups.
#'
#' @para... | /enrichment_analysis/visualize_cluster_distribution.R | no_license | BennyStrobes/gtex_v8_rare_splice | R | false | false | 10,919 | r | args = commandArgs(trailingOnly=TRUE)
library(ggplot2)
library(ggthemes)
library(RColorBrewer)
library(plyr)
library(foreach)
library(gridExtra)
library(Hmisc)
library(reshape2)
#' Make sashimi-esque plot with ggplot2
#'
#' Shows only junction reads and can optionally show splicing variation across groups.
#'
#' @para... |
context("Ensuring that the `tab_style()` function works as expected")
# Create a table from `mtcars` that has all the different components
data <-
gt(mtcars, rownames_to_stub = TRUE) %>%
cols_move_to_start(columns = c("gear", "carb")) %>%
tab_stubhead(label = "cars") %>%
cols_hide(columns = "mpg") %>%
cols_h... | /tests/testthat/test-tab_style.R | permissive | 79W/gt | R | false | false | 17,210 | r | context("Ensuring that the `tab_style()` function works as expected")
# Create a table from `mtcars` that has all the different components
data <-
gt(mtcars, rownames_to_stub = TRUE) %>%
cols_move_to_start(columns = c("gear", "carb")) %>%
tab_stubhead(label = "cars") %>%
cols_hide(columns = "mpg") %>%
cols_h... |
## run in pkg root
if (sub(".*/", "", getwd()) != "broom.mixed") {
stop("should run from package root directory")
}
source(system.file("extdata","example_helpers.R",package="broom.mixed"))
## FIXME: should disaggregate/implement a Makefile!
## environment variable, command-line arguments to R script?
## slow stuff,... | /inst/extdata/run_examples.R | no_license | junkka/broom.mixed | R | false | false | 7,144 | r | ## run in pkg root
if (sub(".*/", "", getwd()) != "broom.mixed") {
stop("should run from package root directory")
}
source(system.file("extdata","example_helpers.R",package="broom.mixed"))
## FIXME: should disaggregate/implement a Makefile!
## environment variable, command-line arguments to R script?
## slow stuff,... |
setwd("C:/Users/Khalid/Desktop/Data Science")
bankruptcy <- read.csv(file = 'C:/Users/Khalid/Desktop/Data Science/bankruptcy.csv')
head(bankruptcy)
### loading data
bankruptcy <- read.csv(file = 'C:/Users/Khalid/Desktop/Data Science/bankruptcy.csv')
head(bankruptcy)
bankruptcy <- na.omit(bankruptcy)
# remove col... | /bankruptcy.r | no_license | Ayinks/First-Exercise | R | false | false | 1,522 | r | setwd("C:/Users/Khalid/Desktop/Data Science")
bankruptcy <- read.csv(file = 'C:/Users/Khalid/Desktop/Data Science/bankruptcy.csv')
head(bankruptcy)
### loading data
bankruptcy <- read.csv(file = 'C:/Users/Khalid/Desktop/Data Science/bankruptcy.csv')
head(bankruptcy)
bankruptcy <- na.omit(bankruptcy)
# remove col... |
rm(list = ls())
library(ggplot2); library(ggdendro); library(ape)
PROJECT_DIR = '/Users/Qihong/Dropbox/github/categorization_PDP'
setwd(PROJECT_DIR)
# you need to enter the file name and folder name here!
DATA_FOLDER = 'sim23.3_noise'
FILENAME = 'hiddenFinal_e4.txt'
# load the data
datapath = paste(PROJECT_DIR, DAT... | /hiddenFinalRep.R | no_license | qihongl/objectRecognition_RNN | R | false | false | 2,479 | r | rm(list = ls())
library(ggplot2); library(ggdendro); library(ape)
PROJECT_DIR = '/Users/Qihong/Dropbox/github/categorization_PDP'
setwd(PROJECT_DIR)
# you need to enter the file name and folder name here!
DATA_FOLDER = 'sim23.3_noise'
FILENAME = 'hiddenFinal_e4.txt'
# load the data
datapath = paste(PROJECT_DIR, DAT... |
\name{cr}
\alias{cr}
\title{ Generate a Basis Matrix for Penalized Cubic Regression Splines }
\description{
Generate the basis matrix for cubic regression splines with penalties on the second derivatives.
}
\usage{
cr(x, df=10, knots=NULL, intercept=FALSE, fx= FALSE, S=NULL)
}
\arguments{
\item{x }{ the predictor... | /man/cr.Rd | no_license | mbexhrs3/dlnm | R | false | false | 4,222 | rd | \name{cr}
\alias{cr}
\title{ Generate a Basis Matrix for Penalized Cubic Regression Splines }
\description{
Generate the basis matrix for cubic regression splines with penalties on the second derivatives.
}
\usage{
cr(x, df=10, knots=NULL, intercept=FALSE, fx= FALSE, S=NULL)
}
\arguments{
\item{x }{ the predictor... |
#########################################################################
## Script that makes a leaflet visualization of the social media data #
## Inputs are twitter and flickr geojsons #
## Output is a leaflet visualization #
#############... | /scripts/G_socialmedia_visualization.R | no_license | lysmarfreitas/tourismdashboard | R | false | false | 2,489 | r | #########################################################################
## Script that makes a leaflet visualization of the social media data #
## Inputs are twitter and flickr geojsons #
## Output is a leaflet visualization #
#############... |
CB_ENV <- R6Class(
"lgb.cb_env",
cloneable = FALSE,
public = list(
model = NULL,
iteration = NULL,
begin_iteration = NULL,
end_iteration = NULL,
eval_list = list(),
eval_err_list = list(),
best_iter = -1,
met_early_stop = FALSE
)
)
cb.reset.parameters <- function(new_params) {
... | /R-package/R/callback.R | permissive | karunamay/LightGBM-CEGB | R | false | false | 10,269 | r | CB_ENV <- R6Class(
"lgb.cb_env",
cloneable = FALSE,
public = list(
model = NULL,
iteration = NULL,
begin_iteration = NULL,
end_iteration = NULL,
eval_list = list(),
eval_err_list = list(),
best_iter = -1,
met_early_stop = FALSE
)
)
cb.reset.parameters <- function(new_params) {
... |
#' Combine Columns to Class
#'
#' Combine columns from qdap classes or a \code{data.frame}.
#'
#' @param dataframe A dataframe or qdap class (e.g.,
#' \code{termco}, \code{question_type}, \code{pos_by}, \code{character_table}).
#' @param combined.columns A list of named vectors of the colnames/indexes
#' of ... | /qdap/R/colcomb2class.R | no_license | ingted/R-Examples | R | false | false | 6,144 | r | #' Combine Columns to Class
#'
#' Combine columns from qdap classes or a \code{data.frame}.
#'
#' @param dataframe A dataframe or qdap class (e.g.,
#' \code{termco}, \code{question_type}, \code{pos_by}, \code{character_table}).
#' @param combined.columns A list of named vectors of the colnames/indexes
#' of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.IFS.R
\name{plot.IFS}
\alias{plot.IFS}
\title{Plot the S3 object of class IFS}
\usage{
\method{plot}{IFS}(x, wektorpocz, glebokosc, ...)
}
\arguments{
\item{x}{object of class IFS}
\item{wektorpocz}{vector of length 2}
\item{glebokosc}... | /Projekt_2/IFSLadne/IFSLadneFraktale/man/plot.IFS.Rd | no_license | ultramargarine/ProgramowanieWizualizacja2017 | R | false | true | 1,931 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.IFS.R
\name{plot.IFS}
\alias{plot.IFS}
\title{Plot the S3 object of class IFS}
\usage{
\method{plot}{IFS}(x, wektorpocz, glebokosc, ...)
}
\arguments{
\item{x}{object of class IFS}
\item{wektorpocz}{vector of length 2}
\item{glebokosc}... |
\name{bw.stoyan}
\alias{bw.stoyan}
\title{
Stoyan's Rule of Thumb for Bandwidth Selection
}
\description{
Computes a rough estimate of the appropriate bandwidth
for kernel smoothing estimators of the pair correlation function
and other quantities.
}
\usage{
bw.stoyan(X, co=0.15)
}
\arguments{
\item{X}{
A... | /man/bw.stoyan.Rd | no_license | cuulee/spatstat | R | false | false | 1,897 | rd | \name{bw.stoyan}
\alias{bw.stoyan}
\title{
Stoyan's Rule of Thumb for Bandwidth Selection
}
\description{
Computes a rough estimate of the appropriate bandwidth
for kernel smoothing estimators of the pair correlation function
and other quantities.
}
\usage{
bw.stoyan(X, co=0.15)
}
\arguments{
\item{X}{
A... |
#' # SETUP
#' Load packages and paths
#+ setup-packages
library(grid)
library(ggplot2)
library(plyr)
library(RColorBrewer)
#' ## Color Scheme
#'
#' CMI Recommendations
#+ setup-colors
cmi_main_blue="#0071b2"
cmi_grey="#929d9e"
cmi_light_blue="#00c4d9"
cmi_pea_green="#b5bf00"
cmi_rich_green="#73933d"
cmi_rich_purpl... | /corr.scripts/46_plot_epi_motion.R | no_license | FCP-INDI/corr_qc | R | false | false | 8,826 | r | #' # SETUP
#' Load packages and paths
#+ setup-packages
library(grid)
library(ggplot2)
library(plyr)
library(RColorBrewer)
#' ## Color Scheme
#'
#' CMI Recommendations
#+ setup-colors
cmi_main_blue="#0071b2"
cmi_grey="#929d9e"
cmi_light_blue="#00c4d9"
cmi_pea_green="#b5bf00"
cmi_rich_green="#73933d"
cmi_rich_purpl... |
library(ISwR)
.make.epsf <- Sys.getenv("EPSF")=="y"
ps.options(height=3.5, width=4.4, pointsize=8, horiz=F)
if (.make.epsf) X11(height=3.5,width=4.4,pointsize=8) else postscript()
dev.copy2eps <- function(...) invisible(grDevices::dev.copy2eps(...))
par(mar=c(4,4,3,2)+.1)
options(width=66, useFancyQuotes="TeX")
suppres... | /ISwR/tests/allscripts.R | no_license | ingted/R-Examples | R | false | false | 32,845 | r | library(ISwR)
.make.epsf <- Sys.getenv("EPSF")=="y"
ps.options(height=3.5, width=4.4, pointsize=8, horiz=F)
if (.make.epsf) X11(height=3.5,width=4.4,pointsize=8) else postscript()
dev.copy2eps <- function(...) invisible(grDevices::dev.copy2eps(...))
par(mar=c(4,4,3,2)+.1)
options(width=66, useFancyQuotes="TeX")
suppres... |
# Reproducible Research
# Be able to communicate and reproduce a data analysis
# Markdown syntax
# * This text will appear Italicized*
# Literate statsitical programming
# - A documentation lanaguage
# - A programming language | /Reproducible_Research.R | no_license | yujie-tao/learn-data-science | R | false | false | 228 | r | # Reproducible Research
# Be able to communicate and reproduce a data analysis
# Markdown syntax
# * This text will appear Italicized*
# Literate statsitical programming
# - A documentation lanaguage
# - A programming language |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/issues.R
\name{modify.milestone}
\alias{modify.milestone}
\title{Edit milestone}
\usage{
modify.milestone(
owner,
repo,
milestone.number,
content,
ctx = get.github.context()
)
}
\arguments{
\item{owner}{the repo owner}
\item{repo}{... | /man/modify.milestone.Rd | permissive | att/rgithub | R | false | true | 637 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/issues.R
\name{modify.milestone}
\alias{modify.milestone}
\title{Edit milestone}
\usage{
modify.milestone(
owner,
repo,
milestone.number,
content,
ctx = get.github.context()
)
}
\arguments{
\item{owner}{the repo owner}
\item{repo}{... |
setwd("/40/AD/AD_Seq_Data/05.-Analyses/06-Aquilla_202101")
wantID <- read.table("/40/AD/AD_Seq_Data/05.-Analyses/06-Aquilla_202101/06-Aquilla_202101-a/FASe_ID_list_round1.txt", header = FALSE, sep =",", check.names = FALSE)
head(wantID)
colnames(wantID) <- c("Original_ID", "VCF_ID", "PR")
dim(wantID)
wantID[] <- lappl... | /WashU_codes/06-Aquilla_202101.R | no_license | achalneupane/rcodes | R | false | false | 78,283 | r | setwd("/40/AD/AD_Seq_Data/05.-Analyses/06-Aquilla_202101")
wantID <- read.table("/40/AD/AD_Seq_Data/05.-Analyses/06-Aquilla_202101/06-Aquilla_202101-a/FASe_ID_list_round1.txt", header = FALSE, sep =",", check.names = FALSE)
head(wantID)
colnames(wantID) <- c("Original_ID", "VCF_ID", "PR")
dim(wantID)
wantID[] <- lappl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qsub_run.R
\name{qsub_run}
\alias{qsub_run}
\title{Run a Function on a gridengine system!}
\usage{
qsub_run(FUN, qsub_config = NULL, qsub_environment = NULL, ...)
}
\arguments{
\item{FUN}{the function to be executed.}
\item{qsub_config}{The ... | /man/qsub_run.Rd | no_license | rcannood/qsub | R | false | true | 686 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qsub_run.R
\name{qsub_run}
\alias{qsub_run}
\title{Run a Function on a gridengine system!}
\usage{
qsub_run(FUN, qsub_config = NULL, qsub_environment = NULL, ...)
}
\arguments{
\item{FUN}{the function to be executed.}
\item{qsub_config}{The ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_best_model_ntbox.R
\name{find_best_model_ntbox}
\alias{find_best_model_ntbox}
\title{Function to find the best n-dimensional ellipsoid model using Partial Roc as a performance criteria.}
\usage{
find_best_model_ntbox(
this_species,
c... | /man/find_best_model_ntbox.Rd | no_license | luismurao/hsi | R | false | true | 2,055 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_best_model_ntbox.R
\name{find_best_model_ntbox}
\alias{find_best_model_ntbox}
\title{Function to find the best n-dimensional ellipsoid model using Partial Roc as a performance criteria.}
\usage{
find_best_model_ntbox(
this_species,
c... |
############################## Analyzing HOUSE PRICES DATA
############################## LIBRARIES AND IMPORT DATA ##################################
library(tidyverse)
library(caret)
library(skimr)
library(xgboost)
library(e1071)
cat("\014")
rm(list = ls())
source("fillingMethodJulien.R")
source("dealingWithNA... | /kaggle-House_Prices/storico/Main.R | no_license | Nabuz/My_work | R | false | false | 11,349 | r | ############################## Analyzing HOUSE PRICES DATA
############################## LIBRARIES AND IMPORT DATA ##################################
library(tidyverse)
library(caret)
library(skimr)
library(xgboost)
library(e1071)
cat("\014")
rm(list = ls())
source("fillingMethodJulien.R")
source("dealingWithNA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/general_misc.R
\name{.readDataTable}
\alias{.readDataTable}
\title{Read data table}
\usage{
.readDataTable(fileName)
}
\arguments{
\item{fileName}{Input filename}
}
\description{
Function to read in a data table. First, it will try to use fre... | /man/dot-readDataTable.Rd | no_license | xia-lab/MicrobiomeAnalystR | R | false | true | 522 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/general_misc.R
\name{.readDataTable}
\alias{.readDataTable}
\title{Read data table}
\usage{
.readDataTable(fileName)
}
\arguments{
\item{fileName}{Input filename}
}
\description{
Function to read in a data table. First, it will try to use fre... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.r
\name{genotypes.boxplot}
\alias{genotypes.boxplot}
\title{Boxplots representation of the distributions of phenotypes according to allelic classes}
\usage{
genotypes.boxplot(X, Y, markers = "all", effects = NULL,
genotypes = c... | /man/genotypes.boxplot.Rd | no_license | ValeriaPaccapelo/mlmm.gwas | R | false | true | 3,221 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.r
\name{genotypes.boxplot}
\alias{genotypes.boxplot}
\title{Boxplots representation of the distributions of phenotypes according to allelic classes}
\usage{
genotypes.boxplot(X, Y, markers = "all", effects = NULL,
genotypes = c... |
#######################################################
# This is an introductory example script for the
# R package "BioGeoBEARS" by Nick Matzke
#
# All scripts are copyright Nicholas J. Matzke,
# please cite if you use. License: GPL-3
# http://cran.r-project.org/web/licenses/GPL-3
#
# I am happy to answer questio... | /inst/extdata/a_scripts/03_BGB_Psychotria_script_DECvDEC+J_wBSM_v1.R | no_license | nmatzke/BioGeoBEARS | R | false | false | 46,651 | r | #######################################################
# This is an introductory example script for the
# R package "BioGeoBEARS" by Nick Matzke
#
# All scripts are copyright Nicholas J. Matzke,
# please cite if you use. License: GPL-3
# http://cran.r-project.org/web/licenses/GPL-3
#
# I am happy to answer questio... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
.get.loss.cpp.internal <- function(X, y, w) {
.Call('_gumbelRegression_get_loss', PACKAGE = 'gumbelRegression', X, y, w)
}
.test.loss.cpp <- function(X, y, w0, w, lossType, l2 = 0, foldId ... | /R/RcppExports.R | no_license | wush978/gumbelRegression | R | false | false | 1,503 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
.get.loss.cpp.internal <- function(X, y, w) {
.Call('_gumbelRegression_get_loss', PACKAGE = 'gumbelRegression', X, y, w)
}
.test.loss.cpp <- function(X, y, w0, w, lossType, l2 = 0, foldId ... |
library(tidyverse)
library(gamlss)
library(ggExtra)
library(gridExtra)
forsdat <- read_csv("../data/fors_study1.csv")
ggplot(forsdat, aes(x = sdo)) +
theme_minimal() +
geom_histogram(bins = 30) +
labs(x = "Social Dominance Orientation", y = "Count") +
theme(text = element_text(size = 16))
prop.table(table(forsd... | /R/fors_study1.R | no_license | markhwhiteii/beta_hurdle | R | false | false | 2,210 | r | library(tidyverse)
library(gamlss)
library(ggExtra)
library(gridExtra)
forsdat <- read_csv("../data/fors_study1.csv")
ggplot(forsdat, aes(x = sdo)) +
theme_minimal() +
geom_histogram(bins = 30) +
labs(x = "Social Dominance Orientation", y = "Count") +
theme(text = element_text(size = 16))
prop.table(table(forsd... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scoring.R
\name{sum_score}
\alias{sum_score}
\title{Sum of correct posterior probabilities}
\usage{
sum_score(plikes, i_chosen, ...)
}
\arguments{
\item{plikes}{Matrix of posterior likelihoods, rows = responses, columns = classes}
\item{i_ch... | /lineId/man/sum_score.Rd | no_license | snarles/fmri | R | false | true | 423 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scoring.R
\name{sum_score}
\alias{sum_score}
\title{Sum of correct posterior probabilities}
\usage{
sum_score(plikes, i_chosen, ...)
}
\arguments{
\item{plikes}{Matrix of posterior likelihoods, rows = responses, columns = classes}
\item{i_ch... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(leaflet)
# Define server logic required to draw a histogram
shinyServer(functio... | /R/shiny1/coffee_and_code/server.R | no_license | MikeHudgell/Coffee-And-Code | R | false | false | 658 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(leaflet)
# Define server logic required to draw a histogram
shinyServer(functio... |
#devtools::test("asremlPlus")
context("model_selection")
asr41.lib <- "D:\\Analyses\\R ASReml4.1"
cat("#### Test estimateV for chick pea example with asreml41\n")
test_that("chickpea_estimateV_asreml41", {
skip_if_not_installed("asreml")
skip_on_cran()
library(dae)
library(asreml, lib.loc = asr41.lib... | /tests/testthat/test41EstimateV.r | no_license | cran/asremlPlus | R | false | false | 11,911 | r | #devtools::test("asremlPlus")
context("model_selection")
asr41.lib <- "D:\\Analyses\\R ASReml4.1"
cat("#### Test estimateV for chick pea example with asreml41\n")
test_that("chickpea_estimateV_asreml41", {
skip_if_not_installed("asreml")
skip_on_cran()
library(dae)
library(asreml, lib.loc = asr41.lib... |
#' Take a SignatureClass object, convert it to a data.table and optionally save it to a .csv
#'
#' @param geneSig [`PharmacoSig`] object to convert to a `data.table`
#'
#' @return [data.table] containing the results in `geneSig` as a `data.table OR [`NULL`] if you specify `saveDir` and
#' `fileName`, in which case ... | /rPharmacoDI/R/convertGeneSignatureToDT.R | no_license | bhklab/DataIngestion | R | false | false | 3,733 | r | #' Take a SignatureClass object, convert it to a data.table and optionally save it to a .csv
#'
#' @param geneSig [`PharmacoSig`] object to convert to a `data.table`
#'
#' @return [data.table] containing the results in `geneSig` as a `data.table OR [`NULL`] if you specify `saveDir` and
#' `fileName`, in which case ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xSHreorder.r
\name{xSHreorder}
\alias{xSHreorder}
\title{Function to draw multiple component planes reorded within a sheet-shape rectangle grid using ggplot2}
\usage{
xSHreorder(sMap, sReorder, title.size = 8, embed.width = 1,
colormap = "spe... | /man/xSHreorder.Rd | no_license | wuwill/XGR | R | false | true | 2,293 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xSHreorder.r
\name{xSHreorder}
\alias{xSHreorder}
\title{Function to draw multiple component planes reorded within a sheet-shape rectangle grid using ggplot2}
\usage{
xSHreorder(sMap, sReorder, title.size = 8, embed.width = 1,
colormap = "spe... |
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- function() inv
list(set = set,
get = get,
setInverse = setInverse,
getInverse = getInverse)
}
c... | /cachematrix.R | no_license | mona9529/ProgrammingAssignment2 | R | false | false | 525 | r | makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- function() inv
list(set = set,
get = get,
setInverse = setInverse,
getInverse = getInverse)
}
c... |
context("wflow_status")
# Setup ------------------------------------------------------------------------
# Setup workflowr project for testing
site_dir <- tempfile("test-wflow_status-")
suppressMessages(wflow_start(site_dir, change_wd = FALSE, user.name = "Test Name",
user.email = "test@e... | /tests/testthat/test-wflow_status.R | permissive | pcarbo/workflowr | R | false | false | 7,950 | r | context("wflow_status")
# Setup ------------------------------------------------------------------------
# Setup workflowr project for testing
site_dir <- tempfile("test-wflow_status-")
suppressMessages(wflow_start(site_dir, change_wd = FALSE, user.name = "Test Name",
user.email = "test@e... |
PKN <- function(txt=c("the","end","of","the")) {
# txt should be a character vector with 1-4 terms
# last term is wi
n <- length(txt)
txt2=txt[1:n-1]
ngram <- paste(txt, collapse=" ")
ngramn1 <- paste(txt2, collapse=" ")
if(n==4) {
P <- df4pruneP[ngram]
... | /Task3_simple.R | no_license | SolGarlic/DataScienceCapstone | R | false | false | 6,105 | r |
PKN <- function(txt=c("the","end","of","the")) {
# txt should be a character vector with 1-4 terms
# last term is wi
n <- length(txt)
txt2=txt[1:n-1]
ngram <- paste(txt, collapse=" ")
ngramn1 <- paste(txt2, collapse=" ")
if(n==4) {
P <- df4pruneP[ngram]
... |
##### SPEAK VISUALLY! #####
##### WORKSHOP 2019 #####
##### JUDIT MOKOS mokjud@gmail.com ####
#----------------------------------------
##### INSTALL GGPLOT ####
#install.packages('ggplot2') #install ggplot2 package
library('ggplot2') #read ggplot2 package
stwd(yourfolder) #set your fol... | /speak_visually.R | no_license | ahetey/speak-visually | R | false | false | 10,532 | r | ##### SPEAK VISUALLY! #####
##### WORKSHOP 2019 #####
##### JUDIT MOKOS mokjud@gmail.com ####
#----------------------------------------
##### INSTALL GGPLOT ####
#install.packages('ggplot2') #install ggplot2 package
library('ggplot2') #read ggplot2 package
stwd(yourfolder) #set your fol... |
#' @name data_rad
#'
#' @title Example of processed rad.txt output from RPDR using the load_rad() function.
#'
#' @description Result of a rad.txt output from RPDR loaded into a data table in R using \emph{load_rad()}.
#'
#' **NOTE**: Due to potential issues with PHI and PPI, the example datasets can be downloaded from... | /R/data_rad.R | no_license | yuluc/parseRPDR | R | false | false | 2,025 | r | #' @name data_rad
#'
#' @title Example of processed rad.txt output from RPDR using the load_rad() function.
#'
#' @description Result of a rad.txt output from RPDR loaded into a data table in R using \emph{load_rad()}.
#'
#' **NOTE**: Due to potential issues with PHI and PPI, the example datasets can be downloaded from... |
## `````````````````````````````````````````````
#### Read Me ####
## `````````````````````````````````````````````
## This file creates folder setup in the project directory
##
## `````````````````````````````````````````````
## `````````````````````````````````````````````
#### Load Libraries ####
## ``````````````... | /create folder v 0 0 1.r | no_license | patternproject/r.characterFunExcercise | R | false | false | 1,786 | r | ## `````````````````````````````````````````````
#### Read Me ####
## `````````````````````````````````````````````
## This file creates folder setup in the project directory
##
## `````````````````````````````````````````````
## `````````````````````````````````````````````
#### Load Libraries ####
## ``````````````... |
data(state)
statedata = data.frame(state.x77)
# load the dataset
str(statedata)
# Setting the working directory
setwd("C:/Users/Mansi/Documents/Assignments/Analytics Edge/Analytics edge (GitHub)/StateData")
# Reading the dataset
statedata <-read.csv(paste("statedata.csv"))
# Scatterplot of all of the states' c... | /StateData/Code.r | no_license | MansiiGoyal/Analytics-edge-MITx- | R | false | false | 2,717 | r | data(state)
statedata = data.frame(state.x77)
# load the dataset
str(statedata)
# Setting the working directory
setwd("C:/Users/Mansi/Documents/Assignments/Analytics Edge/Analytics edge (GitHub)/StateData")
# Reading the dataset
statedata <-read.csv(paste("statedata.csv"))
# Scatterplot of all of the states' c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/co2_add.R
\encoding{UTF-8}
\name{co2_add}
\alias{co2_add}
\title{Calculate CO2 to add to water}
\usage{
co2_add(
goal_pco2,
start_pH,
vol,
temp = 25,
sal = 35,
TA = NULL,
atm_pres = 1013.25
)
}
\arguments{
\item{goal_pco2}{the d... | /respirometry_1.2.0/man/co2_add.Rd | no_license | matthewabirk/respirometry | R | false | true | 1,830 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/co2_add.R
\encoding{UTF-8}
\name{co2_add}
\alias{co2_add}
\title{Calculate CO2 to add to water}
\usage{
co2_add(
goal_pco2,
start_pH,
vol,
temp = 25,
sal = 35,
TA = NULL,
atm_pres = 1013.25
)
}
\arguments{
\item{goal_pco2}{the d... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/sr.r
\name{print.sr}
\alias{print.del_sropt}
\alias{print.sr}
\alias{print.sropt}
\title{Print values.}
\usage{
\method{print}{sr}(x, ...)
\method{print}{sropt}(x, ...)
\method{print}{del_sropt}(x, ...)
}
\arguments{
\item{x}{an obj... | /man/print.Rd | no_license | parthasen/SharpeR | R | false | false | 2,217 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/sr.r
\name{print.sr}
\alias{print.del_sropt}
\alias{print.sr}
\alias{print.sropt}
\title{Print values.}
\usage{
\method{print}{sr}(x, ...)
\method{print}{sropt}(x, ...)
\method{print}{del_sropt}(x, ...)
}
\arguments{
\item{x}{an obj... |
#############################################################################
#
# Buy On Gap Trading implementation
#
# these code execute before the market open, data preparation
#
#############################################################################
Sys.setenv(TZ='America/New_York')
library("quant... | /BuyOnGap_trade/BuyOnGap_trade_prev.R | permissive | jhleong-quant-finance/R-Buy-On-Gap | R | false | false | 6,976 | r | #############################################################################
#
# Buy On Gap Trading implementation
#
# these code execute before the market open, data preparation
#
#############################################################################
Sys.setenv(TZ='America/New_York')
library("quant... |
### soil texture TERN
## spatial prediction
## modified: 18/3/20
## Load models
## load covariates
## run the spaital prediction model
### variables
vart<- "clay"
depth<- "d3"
batch<- 3
srt<- 501
fin<- 750
modsrt<- 41
modfin<- 50
## libraries
library(parallel);library(sp);library(rgdal);library(doParallel);library... | /Production/DSM/SoilTexture/digitalsoilmapping/spatialprediction/clay/d3/spatialise_clay_d3_3.R | permissive | AusSoilsDSM/SLGA | R | false | false | 2,936 | r | ### soil texture TERN
## spatial prediction
## modified: 18/3/20
## Load models
## load covariates
## run the spaital prediction model
### variables
vart<- "clay"
depth<- "d3"
batch<- 3
srt<- 501
fin<- 750
modsrt<- 41
modfin<- 50
## libraries
library(parallel);library(sp);library(rgdal);library(doParallel);library... |
corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... | /assignment_1/corr.R | no_license | bethesdamd/r_programming_coursera | R | false | false | 1,130 | r | corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... |
\name{ex13.31}
\alias{ex13.31}
\non_function{}
\title{data from exercise 13.31}
\description{
The \code{ex13.31} data frame has 7 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{velocity}{
a numeric vector
}
\item{conversn}{
a numeric vector
}
}
}
\details{
}
\source{
D... | /man/ex13.31.Rd | no_license | cran/Devore5 | R | false | false | 473 | rd | \name{ex13.31}
\alias{ex13.31}
\non_function{}
\title{data from exercise 13.31}
\description{
The \code{ex13.31} data frame has 7 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{velocity}{
a numeric vector
}
\item{conversn}{
a numeric vector
}
}
}
\details{
}
\source{
D... |
#Libraries
library("tidyverse")
#Codes
#load data
read.table(file="Saanich.metadata.txt", header=TRUE, row.names = 1, sep="\t", na.strings="NAN")
#to name a variable, "variable name" = read.table and so forth
metadata = read.table(file="Saanich.metadata.txt", header=TRUE, row.names = 1, sep="\t", na.strings="NAN")
... | /SaanichOTU_26Jan2018.R | no_license | karlangelo/MICB425_portfolio | R | false | false | 2,956 | r | #Libraries
library("tidyverse")
#Codes
#load data
read.table(file="Saanich.metadata.txt", header=TRUE, row.names = 1, sep="\t", na.strings="NAN")
#to name a variable, "variable name" = read.table and so forth
metadata = read.table(file="Saanich.metadata.txt", header=TRUE, row.names = 1, sep="\t", na.strings="NAN")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_model_iid_lognormal.R
\name{get_model_iid_lognormal}
\alias{get_model_iid_lognormal}
\title{get_model_iid_lognormal}
\usage{
get_model_iid_lognormal(mu0, kappa0, nu0, sigma02)
}
\description{
Univariate iid lognormal observations
}
| /man/get_model_iid_lognormal.Rd | no_license | pierrejacob/bayeshscore | R | false | true | 314 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_model_iid_lognormal.R
\name{get_model_iid_lognormal}
\alias{get_model_iid_lognormal}
\title{get_model_iid_lognormal}
\usage{
get_model_iid_lognormal(mu0, kappa0, nu0, sigma02)
}
\description{
Univariate iid lognormal observations
}
|
# Tutorial de ggplot2
library(ggplot2)
msleep
head(msleep)
a <- ggplot(data = msleep, aes(x = bodywt, y = sleep_total))
a <- a + geom_point()
a <- a + xlab("") + ylab("") + ggtitle("Datos de algunas especies")
a
# Podemos guardar el dibujo usando
ggsave("dormir_animales.png", plot = a, width = 4, height = 4)
# D... | /Graficos/Tutorial-ggplot2.R | no_license | Louiso/Curso-R | R | false | false | 1,854 | r | # Tutorial de ggplot2
library(ggplot2)
msleep
head(msleep)
a <- ggplot(data = msleep, aes(x = bodywt, y = sleep_total))
a <- a + geom_point()
a <- a + xlab("") + ylab("") + ggtitle("Datos de algunas especies")
a
# Podemos guardar el dibujo usando
ggsave("dormir_animales.png", plot = a, width = 4, height = 4)
# D... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PivotCalculationGroups.R
\docType{class}
\name{PivotCalculationGroups}
\alias{PivotCalculationGroups}
\title{A class that contains multiple calculation groups.}
\format{\code{\link{R6Class}} object.}
\usage{
PivotCalculationGroups
}
\value{
O... | /man/PivotCalculationGroups.Rd | no_license | wulixin/pivottabler | R | false | true | 1,603 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PivotCalculationGroups.R
\docType{class}
\name{PivotCalculationGroups}
\alias{PivotCalculationGroups}
\title{A class that contains multiple calculation groups.}
\format{\code{\link{R6Class}} object.}
\usage{
PivotCalculationGroups
}
\value{
O... |
\name{UK}
\alias{UK}
\docType{data}
\title{
UK Female Mortality Data
}
\description{
Mortality data of women in the calendar year 2006 from United Kingdom.
The data were obtained from the Humam Mortality Database. Only ages from 40 to 110 have been included.
}
\usage{data(UK)}
\format{
This data frame co... | /man/UK.rd | no_license | arturochian/DOvalidation | R | false | false | 1,166 | rd | \name{UK}
\alias{UK}
\docType{data}
\title{
UK Female Mortality Data
}
\description{
Mortality data of women in the calendar year 2006 from United Kingdom.
The data were obtained from the Humam Mortality Database. Only ages from 40 to 110 have been included.
}
\usage{data(UK)}
\format{
This data frame co... |
permeabilityClass=function(texture){
#permeability classes:1-VerySlow, 2-Slow; 3-ModerateSlow; 4-Moderate; 5-ModerateRapid; 6-Rapid; 7-VeryRapid
if(missing(texture)){stop("texture missing")}
if(is.character(texture)){
if(texture=="Cl"){permclass=1}
else if(texture=="SiCl"){permclass=2}
else if(texture... | /R/permeabilityClass.R | no_license | cran/soilassessment | R | false | false | 1,650 | r | permeabilityClass=function(texture){
#permeability classes:1-VerySlow, 2-Slow; 3-ModerateSlow; 4-Moderate; 5-ModerateRapid; 6-Rapid; 7-VeryRapid
if(missing(texture)){stop("texture missing")}
if(is.character(texture)){
if(texture=="Cl"){permclass=1}
else if(texture=="SiCl"){permclass=2}
else if(texture... |
library(caret)
library(mlbench)
data(Glass)
View(Glass)
Glass$Type <- paste0("is", as.factor(Glass$Type == "1"))
table(Glass$Type)
# separar em base de treino e teste
indices <- sample.int(nrow(Glass), size = 0.8*nrow(Glass))
treino <- Glass[indices,]
teste <- Glass[-indices,]
# treinar um modelo
model <- train(Ty... | /machine-learning/06 - caret.R | no_license | curso-r/amostra2017 | R | false | false | 1,567 | r | library(caret)
library(mlbench)
data(Glass)
View(Glass)
Glass$Type <- paste0("is", as.factor(Glass$Type == "1"))
table(Glass$Type)
# separar em base de treino e teste
indices <- sample.int(nrow(Glass), size = 0.8*nrow(Glass))
treino <- Glass[indices,]
teste <- Glass[-indices,]
# treinar um modelo
model <- train(Ty... |
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959243515041e-313, L50 = 0, L95 = 0, LenBins = 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), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615827562-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 487 | r | testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959243515041e-313, L50 = 0, L95 = 0, LenBins = 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), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... |
#' Modify a ggvis branch object by adding new components
#'
#' This operator lets you add objects to a ggvis branch object.
#'
#' You can add the following types of objects to a branch object:
#' \itemize{
#' \item \code{mark}
#' \item \code{branch}
#' \item \code{scale}
#' \item \code{guide_legend}
#' \item ... | /R/ggvis_add.R | no_license | rickyking/ggvis | R | false | false | 2,264 | r | #' Modify a ggvis branch object by adding new components
#'
#' This operator lets you add objects to a ggvis branch object.
#'
#' You can add the following types of objects to a branch object:
#' \itemize{
#' \item \code{mark}
#' \item \code{branch}
#' \item \code{scale}
#' \item \code{guide_legend}
#' \item ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GIS_RiverProcess.R
\name{sp.RiverDown}
\alias{sp.RiverDown}
\title{determine index of downstream
\code{sp.RiverOrder}}
\usage{
sp.RiverDown(sp, coord = extractCoords(sp))
}
\arguments{
\item{sp}{SpatialLines*}
\item{coord}{coordinates of \co... | /man/sp.RiverDown.Rd | permissive | SHUD-System/rSHUD | R | false | true | 447 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GIS_RiverProcess.R
\name{sp.RiverDown}
\alias{sp.RiverDown}
\title{determine index of downstream
\code{sp.RiverOrder}}
\usage{
sp.RiverDown(sp, coord = extractCoords(sp))
}
\arguments{
\item{sp}{SpatialLines*}
\item{coord}{coordinates of \co... |
train <- read.csv("C:/Users/Administrator/Desktop/R Course/day6/Big_Mart_Train.csv")
test <- read.csv("C:/Users/Administrator/Desktop/R Course/day6/Big_Mart_Test.csv")
test$Item_Outlet_Sales <- 1
#combine the data set
combi <- rbind(train, test)
#impute missing values with median
combi$Item_Weight[is.na(combi$Item_W... | /pca_2.R | no_license | suryaprakashb/classAssignments | R | false | false | 2,423 | r | train <- read.csv("C:/Users/Administrator/Desktop/R Course/day6/Big_Mart_Train.csv")
test <- read.csv("C:/Users/Administrator/Desktop/R Course/day6/Big_Mart_Test.csv")
test$Item_Outlet_Sales <- 1
#combine the data set
combi <- rbind(train, test)
#impute missing values with median
combi$Item_Weight[is.na(combi$Item_W... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 22495
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22487
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22487
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Wintersteiger/LinearBitvectorRankingFunction/general_pcidrv_sys_hw_eeprom2.c/general_pcidrv_sys_hw_eeprom2.c.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 814 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 22495
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22487
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22487
c
c Input Parameter (command line, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cmr_igraph.R
\name{cmr_igraph}
\alias{cmr_igraph}
\title{cmr_igraph}
\usage{
cmr_igraph(cmrnet, type = c("social", "movement", "multiplex"))
}
\arguments{
\item{cmrnet}{A CMRnet object from \code{DynamicNetCreate}, \code{MoveNetCreate} or \co... | /man/cmr_igraph.Rd | no_license | matthewsilk/CMRnet | R | false | true | 2,206 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cmr_igraph.R
\name{cmr_igraph}
\alias{cmr_igraph}
\title{cmr_igraph}
\usage{
cmr_igraph(cmrnet, type = c("social", "movement", "multiplex"))
}
\arguments{
\item{cmrnet}{A CMRnet object from \code{DynamicNetCreate}, \code{MoveNetCreate} or \co... |
# By default, Xapian orders search results by decreasing relevance score.
# However, it also allows results to be ordered by other criteria, or a combination of other criteria and relevance score.
# In this example, results for the searched query is ordered by year of entry to the union and then by decreasing populati... | /demo/search_sorting2.R | no_license | amandaJayanetti/RXapian | R | false | false | 852 | r | # By default, Xapian orders search results by decreasing relevance score.
# However, it also allows results to be ordered by other criteria, or a combination of other criteria and relevance score.
# In this example, results for the searched query is ordered by year of entry to the union and then by decreasing populati... |
###############################################################################
#### Indicators base script ####
library(survey)
library(convey)
library(plyr)
library(dplyr)
# Subsetting for households --------------------------------------------------------------
#David: Hinzugefuegt. Vorsicht, ueberschreibt bish... | /reports/GBR/Indicators script.R | permissive | LinoKK/ineq_project | R | false | false | 20,088 | r | ###############################################################################
#### Indicators base script ####
library(survey)
library(convey)
library(plyr)
library(dplyr)
# Subsetting for households --------------------------------------------------------------
#David: Hinzugefuegt. Vorsicht, ueberschreibt bish... |
company_name_lu <- query_athena(" select companyname from estat_dsl2531b_oja.ft_document_en_V8 where idcountry='LU' limit 1000") | /scripts/company_name.R | no_license | paulinoraquel/oja_analysis | R | false | false | 128 | r | company_name_lu <- query_athena(" select companyname from estat_dsl2531b_oja.ft_document_en_V8 where idcountry='LU' limit 1000") |
# dplyr包括了(几乎)全部可以用来加快数据处理进程的内容。
# 它最有名的是数据探索和数据转换功能。
# 它的链式语法让它使用起来很方便。它包括5个主要的数据处理指令:
# 过滤——集于某一条件过滤数据
# 选择——选出数据集中感兴趣的列
# 排列——升序或降序排列数据集中的某一个值域
# 变换——从已有变量生成新的变量
# 概括(通过group_by)——提供常用的操作分析,如最小值、最大值、均值等
# 只需要关注这些指令便可以完成很好的数据探索工作。
library(dplyr)
data("mtcars")
data("iris")
#create a local dataframe. Local data fram... | /data process.R | no_license | deningteng/RLearningRepository | R | false | false | 9,372 | r | # dplyr包括了(几乎)全部可以用来加快数据处理进程的内容。
# 它最有名的是数据探索和数据转换功能。
# 它的链式语法让它使用起来很方便。它包括5个主要的数据处理指令:
# 过滤——集于某一条件过滤数据
# 选择——选出数据集中感兴趣的列
# 排列——升序或降序排列数据集中的某一个值域
# 变换——从已有变量生成新的变量
# 概括(通过group_by)——提供常用的操作分析,如最小值、最大值、均值等
# 只需要关注这些指令便可以完成很好的数据探索工作。
library(dplyr)
data("mtcars")
data("iris")
#create a local dataframe. Local data fram... |
#' Search bills
#'
#' @export
#' @param query (character) keyword or phrase. required
#' @param sort (character) "_score" or "date" (default)
#' @param dir (character) asc or desc (default)
#' @template args
#' @return some nasty parsing, so just list of lists for now
#' @examples \dontrun{
#' cg_bills(query = "megaher... | /R/cg_bills.R | permissive | rOpenGov/rsunlight | R | false | false | 903 | r | #' Search bills
#'
#' @export
#' @param query (character) keyword or phrase. required
#' @param sort (character) "_score" or "date" (default)
#' @param dir (character) asc or desc (default)
#' @template args
#' @return some nasty parsing, so just list of lists for now
#' @examples \dontrun{
#' cg_bills(query = "megaher... |
#' Read a QIIME sample mapping file.
#'
#' @param filepath Path to sample mapping file. The file must conform to the
#' QIIME standards, detailed at
#' \url{http://qiime.org/documentation/file_formats.html}.
#' @return A data frame.
#' @export
parse_mapping_file <- function(filepath) {
sample_file <- file(file... | /R/sample_mapping.R | no_license | aubreybailey/qiimer | R | false | false | 1,297 | r | #' Read a QIIME sample mapping file.
#'
#' @param filepath Path to sample mapping file. The file must conform to the
#' QIIME standards, detailed at
#' \url{http://qiime.org/documentation/file_formats.html}.
#' @return A data frame.
#' @export
parse_mapping_file <- function(filepath) {
sample_file <- file(file... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/querycount.R
\docType{class}
\name{QueryCountMaster}
\alias{QueryCountMaster}
\title{Create a master object to control worker objects generated by \code{\link[=QueryCountWorker]{QueryCountWorker()}}}
\description{
\code{QueryCountMaster} obje... | /man/QueryCountMaster.Rd | no_license | cran/distcomp | R | false | true | 4,705 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/querycount.R
\docType{class}
\name{QueryCountMaster}
\alias{QueryCountMaster}
\title{Create a master object to control worker objects generated by \code{\link[=QueryCountWorker]{QueryCountWorker()}}}
\description{
\code{QueryCountMaster} obje... |
context("Test ggplot_RIGHT.R")
## ---
## Test ggplot_RIGHT():
## ---
test_that("Check returned object from ggplot_RIGHT()", {
expect_error(ggplot_RIGHT(dummy))
obj <- createGgplot(Theoph, ggplot2::aes(conc, Time))
expect_identical(obj$labels$x, "conc")
expect_identical(obj$labels$y, "Time")
}) # ... | /inst/tests/testGgplot_RIGHT.R | no_license | RIGHThelp/r-interactive-graphics-via-html | R | false | false | 6,020 | r | context("Test ggplot_RIGHT.R")
## ---
## Test ggplot_RIGHT():
## ---
test_that("Check returned object from ggplot_RIGHT()", {
expect_error(ggplot_RIGHT(dummy))
obj <- createGgplot(Theoph, ggplot2::aes(conc, Time))
expect_identical(obj$labels$x, "conc")
expect_identical(obj$labels$y, "Time")
}) # ... |
library('nloptr')
load('fakedata.RData')
tvec = xtraj[1,]
fd = xtraj[-1,]
source('adjoint.R')
myh = 0.1
myk = (myh)^(0.6)
mybigm = ceiling(pi/(myk^1.5))
numparam = 6
inittheta = as.numeric(0*c(1:(numparam-1)))
inittheta[numparam] = 0.7
myoptfun <- function(data, indices)
{
fdnewdata = rbind(tvec, fd[i... | /adjoint/example1new/optimtestfun.R | no_license | hbhat4000/sdeinference | R | false | false | 698 | r | library('nloptr')
load('fakedata.RData')
tvec = xtraj[1,]
fd = xtraj[-1,]
source('adjoint.R')
myh = 0.1
myk = (myh)^(0.6)
mybigm = ceiling(pi/(myk^1.5))
numparam = 6
inittheta = as.numeric(0*c(1:(numparam-1)))
inittheta[numparam] = 0.7
myoptfun <- function(data, indices)
{
fdnewdata = rbind(tvec, fd[i... |
context("create")
test_that("create_env()", {
env <- create_env(lapply(letters, as.name), toupper)
expect_equal(env$a, "A")
expect_equal(env$x, "X")
expect_null(env$X)
expect_equal(length(ls(env)), length(letters))
expect_error(env$a <- "a", "read-only")
})
test_that("create_env() with character", {
env... | /tests/testthat/test-create.R | no_license | krlmlr/bindr | R | false | false | 1,377 | r | context("create")
test_that("create_env()", {
env <- create_env(lapply(letters, as.name), toupper)
expect_equal(env$a, "A")
expect_equal(env$x, "X")
expect_null(env$X)
expect_equal(length(ls(env)), length(letters))
expect_error(env$a <- "a", "read-only")
})
test_that("create_env() with character", {
env... |
##
# Copyright (c) 2009-2014 LabKey Corporation
#
# 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 l... | /Rlabkey/R/labkey.deleteRows.R | no_license | SRenan/labkey-api-r | R | false | false | 2,286 | r | ##
# Copyright (c) 2009-2014 LabKey Corporation
#
# 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 l... |
# Enter your code here. Read input from STDIN. Print output to STDOUT
nums <- scan("/dev/stdin", sep=" ")
#typeof(nums)
sum <- 0
for ( i in 2:length(nums))
sum <- sum + nums[i]
cat(sum)
| /Warmup/Simple Array Sum.R | no_license | qianelsali/Hackerrank-Algorithms | R | false | false | 194 | r | # Enter your code here. Read input from STDIN. Print output to STDOUT
nums <- scan("/dev/stdin", sep=" ")
#typeof(nums)
sum <- 0
for ( i in 2:length(nums))
sum <- sum + nums[i]
cat(sum)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_model_performance.R
\name{plot.model_performance_explainer}
\alias{plot.model_performance_explainer}
\title{Model Performance Plots}
\usage{
\method{plot}{model_performance_explainer}(x, ..., geom = "ecdf",
lossFunction = function(x) s... | /man/plot.model_performance_explainer.Rd | no_license | baifengbai/DALEX | R | false | true | 1,635 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_model_performance.R
\name{plot.model_performance_explainer}
\alias{plot.model_performance_explainer}
\title{Model Performance Plots}
\usage{
\method{plot}{model_performance_explainer}(x, ..., geom = "ecdf",
lossFunction = function(x) s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topten.R
\name{topten}
\alias{topten}
\title{Building a Model with top Features}
\usage{
topten(x, y)
}
\arguments{
\item{x}{a n x p matrix of n observations and p predictors}
\item{y}{a vector of length n representing the response}
}
\value... | /topten.Rcheck/00_pkg_src/topten/man/topten.Rd | no_license | maolenin/09_ddp | R | false | true | 803 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topten.R
\name{topten}
\alias{topten}
\title{Building a Model with top Features}
\usage{
topten(x, y)
}
\arguments{
\item{x}{a n x p matrix of n observations and p predictors}
\item{y}{a vector of length n representing the response}
}
\value... |
### === PK-11195 TrT Analysis === ###
### // Pontus P. Sigray, KI, April 2018
#load packges
library(tidyverse)
library(granviller)
#Load data
load(file = './DerivedData/TrTData.Rdata')
trtdata <- TidyAll %>%
select(subject, PETno, Region, Vt.2tcm, Vs.2tcm, BPND.2tcm,
bp.srtm.cer, bp.srtm.svca_turkheimer,... | /R/TrTAnalysis/TrTAnalysis.R | no_license | pontusps/PK11195_TestRetest | R | false | false | 1,455 | r | ### === PK-11195 TrT Analysis === ###
### // Pontus P. Sigray, KI, April 2018
#load packges
library(tidyverse)
library(granviller)
#Load data
load(file = './DerivedData/TrTData.Rdata')
trtdata <- TidyAll %>%
select(subject, PETno, Region, Vt.2tcm, Vs.2tcm, BPND.2tcm,
bp.srtm.cer, bp.srtm.svca_turkheimer,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{metro_berlin}
\alias{metro_berlin}
\title{Subway network of Berlin}
\format{
igraph object
}
\usage{
metro_berlin
}
\description{
A dataset containing the subway network of Berlin
}
\references{
Kujala, Rainer, et ... | /man/metro_berlin.Rd | permissive | shriv/edgebundle | R | false | true | 447 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{metro_berlin}
\alias{metro_berlin}
\title{Subway network of Berlin}
\format{
igraph object
}
\usage{
metro_berlin
}
\description{
A dataset containing the subway network of Berlin
}
\references{
Kujala, Rainer, et ... |
#!/usr/bin/env Rscript
library(ggplot2)
source('base.R')
## prepare data ##############################################################
iden.data = Reduce(merge, list(
parse.read.table('codejam', 'identifier-readable.2014.txt'),
parse.read.table('codejam', 'language.2014.txt')))
## plotting ###############... | /visualize/codejam-identifier-read-vs-lang.R | permissive | neizod/coding-analysis | R | false | false | 650 | r | #!/usr/bin/env Rscript
library(ggplot2)
source('base.R')
## prepare data ##############################################################
iden.data = Reduce(merge, list(
parse.read.table('codejam', 'identifier-readable.2014.txt'),
parse.read.table('codejam', 'language.2014.txt')))
## plotting ###############... |
devtools::load_all()
url <- "http://data.trilliumtransit.com/gtfs/duke-nc-us/duke-nc-us.zip"
gtfs_duke <- read_gtfs(url, quiet=TRUE)
saveRDS(gtfs_duke, here::here('data-raw/gtfs_duke'))
usethis::use_data(gtfs_duke)
| /data-raw/create-gtfs-obj.R | no_license | mpadge/tidytransit | R | false | false | 215 | r | devtools::load_all()
url <- "http://data.trilliumtransit.com/gtfs/duke-nc-us/duke-nc-us.zip"
gtfs_duke <- read_gtfs(url, quiet=TRUE)
saveRDS(gtfs_duke, here::here('data-raw/gtfs_duke'))
usethis::use_data(gtfs_duke)
|
library(tidyverse)
library(sf)
library(nusantr)
library(mrsq)
library(units)
csk <- read_sf("data/csk.geojson")
csk_river <- read_sf("data/csk_river.geojson")
point <- tibble(latitude = -6.3252265,
longitude = 106.6414905) %>%
st_as_sf(coords = c("longitude", "latitude"), crs = 4326)
point2 <- tibble... | /geo.R | no_license | rasyidstat/csk | R | false | false | 2,987 | r | library(tidyverse)
library(sf)
library(nusantr)
library(mrsq)
library(units)
csk <- read_sf("data/csk.geojson")
csk_river <- read_sf("data/csk_river.geojson")
point <- tibble(latitude = -6.3252265,
longitude = 106.6414905) %>%
st_as_sf(coords = c("longitude", "latitude"), crs = 4326)
point2 <- tibble... |
#' Creates a [`dm`] object for the \pkg{nycflights13} data
#'
#' @description Creates an example [`dm`] object from the tables in \pkg{nycflights13},
#' along with the references.
#' See [nycflights13::flights] for a description of the data.
#' As described in [nycflights13::planes], the relationship
#' between the `fl... | /R/nycflights13.R | permissive | jasonyum/dm | R | false | false | 1,694 | r | #' Creates a [`dm`] object for the \pkg{nycflights13} data
#'
#' @description Creates an example [`dm`] object from the tables in \pkg{nycflights13},
#' along with the references.
#' See [nycflights13::flights] for a description of the data.
#' As described in [nycflights13::planes], the relationship
#' between the `fl... |
# Put model estimates into temporary data.frames:
lev = factor(c(rownames(summary(model_NB1)$coef)),
levels = c(rownames(summary(model_NB1)$coef)))
model1Frame = data.frame(Variable = lev,
Coefficient = summary(model_NB1)$coef[, 1],
SE = summary(model_NB... | /CoefficientPlotCode.R | no_license | alejandromerchan/ICE_Simulation | R | false | false | 4,268 | r | # Put model estimates into temporary data.frames:
lev = factor(c(rownames(summary(model_NB1)$coef)),
levels = c(rownames(summary(model_NB1)$coef)))
model1Frame = data.frame(Variable = lev,
Coefficient = summary(model_NB1)$coef[, 1],
SE = summary(model_NB... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lgb.Booster.R
\name{lgb.load}
\alias{lgb.load}
\title{Load LightGBM model}
\usage{
lgb.load(filename = NULL, model_str = NULL)
}
\arguments{
\item{filename}{path of model file}
\item{model_str}{a str containing the model}
}
\value{
booster
}... | /R-package/man/lgb.load.Rd | permissive | jfpuget/LightGBM | R | false | true | 1,232 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lgb.Booster.R
\name{lgb.load}
\alias{lgb.load}
\title{Load LightGBM model}
\usage{
lgb.load(filename = NULL, model_str = NULL)
}
\arguments{
\item{filename}{path of model file}
\item{model_str}{a str containing the model}
}
\value{
booster
}... |
library(testthat)
context("PeakSegJoint")
library(PeakSegJoint)
library(ggplot2)
library(PeakError) # for tallrect.
test_that("PeakSegJointHeuristic C result agrees with R", {
data(H3K36me3.TDH.other.chunk1)
lims <- c(43000000, 43200000) # left
some.sample.ids <- H3K36me3.TDH.other.chunk1$counts$sample.id
som... | /tests/testthat/test-functions-PeakSegJoint.R | no_license | kezkankrayon/PeakSegJoint | R | false | false | 45,216 | r | library(testthat)
context("PeakSegJoint")
library(PeakSegJoint)
library(ggplot2)
library(PeakError) # for tallrect.
test_that("PeakSegJointHeuristic C result agrees with R", {
data(H3K36me3.TDH.other.chunk1)
lims <- c(43000000, 43200000) # left
some.sample.ids <- H3K36me3.TDH.other.chunk1$counts$sample.id
som... |
#' Capitalize first character
#'
#' @param x The string to be capitalized
#' @return The string, but with the first letter being capitalized
firstup <- function(x) {
substr(x, 1, 1) <- toupper(substr(x, 1, 1))
x
}
#' Create an alluvia plot
#'
#' Creates an alluvia plot that represents trade flows
#'
#' @param y... | /code/bilat_analysis_functions.R | permissive | graebnerc/disintegrating-europe | R | false | false | 3,188 | r | #' Capitalize first character
#'
#' @param x The string to be capitalized
#' @return The string, but with the first letter being capitalized
firstup <- function(x) {
substr(x, 1, 1) <- toupper(substr(x, 1, 1))
x
}
#' Create an alluvia plot
#'
#' Creates an alluvia plot that represents trade flows
#'
#' @param y... |
## File Name: summary_round_helper.R
## File Version: 0.09
summary_round_helper <- function( obji, digits, exclude=NULL, print=TRUE)
{
NC <- ncol(obji)
ind <- 1:NC
if ( ! is.null(exclude) ){
ind2 <- which( colnames(obji) %in% exclude )
ind <- setdiff( ind, ind2 )
}
obji[,ind] <- rou... | /R/summary_round_helper.R | no_license | alexanderrobitzsch/sirt | R | false | false | 410 | r | ## File Name: summary_round_helper.R
## File Version: 0.09
summary_round_helper <- function( obji, digits, exclude=NULL, print=TRUE)
{
NC <- ncol(obji)
ind <- 1:NC
if ( ! is.null(exclude) ){
ind2 <- which( colnames(obji) %in% exclude )
ind <- setdiff( ind, ind2 )
}
obji[,ind] <- rou... |
# Construct an internal xgboost Booster and return a handle to it.
# internal utility function
xgb.Booster.handle <- function(params = list(), cachelist = list(), modelfile = NULL) {
if (typeof(cachelist) != "list" ||
!all(vapply(cachelist, inherits, logical(1), what = 'xgb.DMatrix'))) {
stop("cachelist mus... | /ml-xgboost/R-package/R/xgb.Booster.R | permissive | kunpengcompute/Spark-ml-algo-lib | R | false | false | 27,880 | r | # Construct an internal xgboost Booster and return a handle to it.
# internal utility function
xgb.Booster.handle <- function(params = list(), cachelist = list(), modelfile = NULL) {
if (typeof(cachelist) != "list" ||
!all(vapply(cachelist, inherits, logical(1), what = 'xgb.DMatrix'))) {
stop("cachelist mus... |
## Event logging to Hive
x <- character()
for (day in 11:15) {
for (hour in 0:23) {
x <- c(x, sprintf("ALTER TABLE TestSearchSatisfaction2
ADD PARTITION (year=2016,month=11,day=%0.0f,hour=%0.0f)
LOCATION '/wmf/data/raw/eventlogging/eventlogging_TestSearchSatisfaction2/hourly/2016/11/%02.0f/%02.0f';", day, hou... | /data.R | permissive | wikimedia-research/Discovery-Search-2ndTest-BM25_jazhth | R | false | false | 5,971 | r | ## Event logging to Hive
x <- character()
for (day in 11:15) {
for (hour in 0:23) {
x <- c(x, sprintf("ALTER TABLE TestSearchSatisfaction2
ADD PARTITION (year=2016,month=11,day=%0.0f,hour=%0.0f)
LOCATION '/wmf/data/raw/eventlogging/eventlogging_TestSearchSatisfaction2/hourly/2016/11/%02.0f/%02.0f';", day, hou... |
#'
#' Default model-specific functions
#'
#'
#'
#' @param .datasets
#' @param .metadata
#'
removeRedundantCols <- function(.datasets, .metadata) {
cols <- setdiff(common.fe.findRedundantCols(.datasets$Test), unlist(.metadata))
stopifnot(
!any(setdiff(cols, names(.datasets$Test)))
)
write... | /source/default_modeling.R | permissive | Karagul/HomeCreditDefaultRisk | R | false | false | 4,242 | r |
#'
#' Default model-specific functions
#'
#'
#'
#' @param .datasets
#' @param .metadata
#'
removeRedundantCols <- function(.datasets, .metadata) {
cols <- setdiff(common.fe.findRedundantCols(.datasets$Test), unlist(.metadata))
stopifnot(
!any(setdiff(cols, names(.datasets$Test)))
)
write... |
f<-function(x){
fx<-2
return (fx)
}
input<-0:10
plot(input,
sapply(input,f),
type ="l",xlab="x",
ylab="(fx)")
f<-function(x){
fx<-1*x+2
return(fx)
}
input<- -100:1000
plot(input,
sapply(input,f),
type="l",
xlab="x",
ylab="(fx)")
f<-function(x){
#a=1 b=2,c=1
fx<-1*... | /GraphofFunction.r | no_license | TheDayEater/TMATLAN | R | false | false | 961 | r |
f<-function(x){
fx<-2
return (fx)
}
input<-0:10
plot(input,
sapply(input,f),
type ="l",xlab="x",
ylab="(fx)")
f<-function(x){
fx<-1*x+2
return(fx)
}
input<- -100:1000
plot(input,
sapply(input,f),
type="l",
xlab="x",
ylab="(fx)")
f<-function(x){
#a=1 b=2,c=1
fx<-1*... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
sd_gsl <- function(mx) {
.Call(`_yeastfitness_sd_gsl`, mx)
}
one_if_zero <- function(x) {
.Call(`_yeastfitness_one_if_zero`, x)
}
sd_cpp <- function(x) {
.Call(`_yeastfitness_sd_c... | /yeastfitness/R/RcppExports.R | no_license | hannz88/Yeast_MOEA | R | false | false | 1,521 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
sd_gsl <- function(mx) {
.Call(`_yeastfitness_sd_gsl`, mx)
}
one_if_zero <- function(x) {
.Call(`_yeastfitness_one_if_zero`, x)
}
sd_cpp <- function(x) {
.Call(`_yeastfitness_sd_c... |
library(shiny)
library(plotly)
# Define UI for miles per gallon app ----
ui <- fluidPage(
# App title ----
titlePanel("RShiny webapp tools"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
h3(textOutput("test"... | /ui.R | no_license | anthonyxiang1/firstShiny | R | false | false | 1,217 | r | library(shiny)
library(plotly)
# Define UI for miles per gallon app ----
ui <- fluidPage(
# App title ----
titlePanel("RShiny webapp tools"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
h3(textOutput("test"... |
rm(list=ls())
cat("\014")
x <- c(4,5,9,12)
y <- c(9,8,6,3)
#x <- c(4,5,9,9,9,9,9,9,9,9,9,9,9,12)
#y <- c(9,8,6,6,6,6,6,6,6,6,6,6,6,3)
model <- lm(y~x)
plot(x,y)
print(summary(model))
abline(model)
| /try.R | no_license | chingheng113/strokeValidationR | R | false | false | 201 | r | rm(list=ls())
cat("\014")
x <- c(4,5,9,12)
y <- c(9,8,6,3)
#x <- c(4,5,9,9,9,9,9,9,9,9,9,9,9,12)
#y <- c(9,8,6,6,6,6,6,6,6,6,6,6,6,3)
model <- lm(y~x)
plot(x,y)
print(summary(model))
abline(model)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nabat_grts.R
\name{normalize_grid_frame}
\alias{normalize_grid_frame}
\title{Normalize grid frame}
\usage{
normalize_grid_frame(grid_frame)
}
\arguments{
\item{grid_frame}{String name of the grid frame to return}
}
\description{
normalize... | /man/normalize_grid_frame.Rd | permissive | MLBartley/nabatr | R | false | true | 386 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nabat_grts.R
\name{normalize_grid_frame}
\alias{normalize_grid_frame}
\title{Normalize grid frame}
\usage{
normalize_grid_frame(grid_frame)
}
\arguments{
\item{grid_frame}{String name of the grid frame to return}
}
\description{
normalize... |
#Date created: 24/11/2020
#Date modified: 30/11/2020
#Author created: Maren Büttner
#Author modified:
#Description: Differences in abundance test with Dirichlet Regression upon subsampling
#Project: scCODA paper
library(nlme)
library(tidyverse)
library(ggplot2)
library(compositions)
library(DirichletReg)
#get date
... | /scripts/01_Dirichlet_Regression_subsample_test.R | permissive | theislab/scCODA_reproducibility | R | false | false | 8,221 | r | #Date created: 24/11/2020
#Date modified: 30/11/2020
#Author created: Maren Büttner
#Author modified:
#Description: Differences in abundance test with Dirichlet Regression upon subsampling
#Project: scCODA paper
library(nlme)
library(tidyverse)
library(ggplot2)
library(compositions)
library(DirichletReg)
#get date
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project.R
\name{project.tags<-,ProjectSummary-method}
\alias{project.tags<-,ProjectSummary-method}
\title{Replaces the project tags}
\usage{
\S4method{project.tags}{ProjectSummary}(object) <- value
}
\arguments{
\item{object}{a ProjectSummary... | /man/project.tags-set-ProjectSummary-method.Rd | no_license | booker-tremayne/new-prideR | R | false | true | 424 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project.R
\name{project.tags<-,ProjectSummary-method}
\alias{project.tags<-,ProjectSummary-method}
\title{Replaces the project tags}
\usage{
\S4method{project.tags}{ProjectSummary}(object) <- value
}
\arguments{
\item{object}{a ProjectSummary... |
### =========================================================================
### RleViews objects
### -------------------------------------------------------------------------
###
### The RleViews class is the basic container for storing a set of views
### (start/end locations) on the same Rle object, called the "su... | /R/RleViews-class.R | no_license | Bioconductor/IRanges | R | false | false | 4,367 | r | ### =========================================================================
### RleViews objects
### -------------------------------------------------------------------------
###
### The RleViews class is the basic container for storing a set of views
### (start/end locations) on the same Rle object, called the "su... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MAsPShiny.R
\name{MAsPShiny}
\alias{MAsPShiny}
\title{MAsP Web Application}
\usage{
MAsPShiny()
}
\description{
This function initiates the R shiny app 'MAsP'.
}
| /man/MAsPShiny.Rd | permissive | JunQu-Lab/MAsP | R | false | true | 240 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MAsPShiny.R
\name{MAsPShiny}
\alias{MAsPShiny}
\title{MAsP Web Application}
\usage{
MAsPShiny()
}
\description{
This function initiates the R shiny app 'MAsP'.
}
|
#' Helper for creating a bar chart
#'
#' @param bb A \code{billboard} \code{htmlwidget} object.
#' @param data A \code{data.frame}, the first column will be used for x axis unless
#' specified otherwise in \code{mapping}. If not a \code{data.frame}, an object coercible to \code{data.frame}.
#' @param mapping Mapping of... | /R/bb_helpers.R | no_license | pro100mir/billboarder | R | false | false | 42,269 | r | #' Helper for creating a bar chart
#'
#' @param bb A \code{billboard} \code{htmlwidget} object.
#' @param data A \code{data.frame}, the first column will be used for x axis unless
#' specified otherwise in \code{mapping}. If not a \code{data.frame}, an object coercible to \code{data.frame}.
#' @param mapping Mapping of... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{extract_2d}
\alias{extract_2d}
\title{Extracting information for our default/provided plot2d()}
\usage{
extract_2d(zargs)
}
\arguments{
\item{zargs}{The argument list as passed from \code{\link{zenplot}()}.
This must at least c... | /man/extract_2d.Rd | no_license | great-northern-diver/zenplots | R | false | true | 4,426 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{extract_2d}
\alias{extract_2d}
\title{Extracting information for our default/provided plot2d()}
\usage{
extract_2d(zargs)
}
\arguments{
\item{zargs}{The argument list as passed from \code{\link{zenplot}()}.
This must at least c... |
library(ggplot2) #must load the ggplot package first
install.packages('tidyverse')
qplot(x = price, data=diamonds)
# Count, By
table(diamonds$price < 500)
table(diamonds$price < 250)
table(diamonds$price >= 15000)
#quiz 5 # Explore the largest peak in the
# price histogram you created earlier.
qplot(x=price, data=di... | /Udacity+Facebook/lesson 4.R | no_license | leejaeka/Exploratory-Data-Analysis | R | false | false | 1,469 | r | library(ggplot2) #must load the ggplot package first
install.packages('tidyverse')
qplot(x = price, data=diamonds)
# Count, By
table(diamonds$price < 500)
table(diamonds$price < 250)
table(diamonds$price >= 15000)
#quiz 5 # Explore the largest peak in the
# price histogram you created earlier.
qplot(x=price, data=di... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AddScaleBar.R
\name{AddScaleBar}
\alias{AddScaleBar}
\title{Add Scale Bar to Plot}
\usage{
AddScaleBar(asp = 1, unit = NULL, is.lonlat = FALSE,
loc = c("bottomleft", "topleft", "topright", "bottomright"), offset = c(0,
0), lab.vert.exag =... | /man/AddScaleBar.Rd | permissive | cocomice/inlmisc | R | false | true | 1,415 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AddScaleBar.R
\name{AddScaleBar}
\alias{AddScaleBar}
\title{Add Scale Bar to Plot}
\usage{
AddScaleBar(asp = 1, unit = NULL, is.lonlat = FALSE,
loc = c("bottomleft", "topleft", "topright", "bottomright"), offset = c(0,
0), lab.vert.exag =... |
# Page No. 209
I <- 0.500
t <- 55 * 60
F <- 96485.3
M <- 63.546
Q <- I * t
n <- Q / F
w <- n * (M / 2)
print(w) | /Modern_Physical_Chemistry_A_Molecular_Approach_by_George_H_Duffey/CH9/EX9.1/Ex9_1.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 114 | r | # Page No. 209
I <- 0.500
t <- 55 * 60
F <- 96485.3
M <- 63.546
Q <- I * t
n <- Q / F
w <- n * (M / 2)
print(w) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.