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: do not edit by hand
% Please edit documentation in R/timeclust.R
\name{timeclust}
\alias{timeclust}
\title{time couse data clustering}
\usage{
timeclust(
x,
algo,
k,
dist = "distance",
dist.method = "euclidean",
centers = NULL,
standardize = TRUE,
...
)
}
\argum... | /man/timeclust.Rd | no_license | MengjunWu/TCseq | R | false | true | 3,467 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/timeclust.R
\name{timeclust}
\alias{timeclust}
\title{time couse data clustering}
\usage{
timeclust(
x,
algo,
k,
dist = "distance",
dist.method = "euclidean",
centers = NULL,
standardize = TRUE,
...
)
}
\argum... |
#' Applies the Bagging algorithm to a dataset
#'
#' Fits the Bagging algorithm proposed by Breiman in
#' 1996 using classification trees as single classifiers.
#'
#' @param data FLTable
#' @param formula formula specifying the independent and dependent variable columns
#' @param mfinal an integer, the number of iterati... | /R/bagging.R | no_license | richa3522/AdapteR | R | false | false | 2,803 | r | #' Applies the Bagging algorithm to a dataset
#'
#' Fits the Bagging algorithm proposed by Breiman in
#' 1996 using classification trees as single classifiers.
#'
#' @param data FLTable
#' @param formula formula specifying the independent and dependent variable columns
#' @param mfinal an integer, the number of iterati... |
#' Read or write a steward dataset
#'
#' This will read from or write to a set of files: o CSV file for the data,
#' and a YAML file for the meta-data.
#'
#' At the moment, this provides minimal functionality. In the future, we can
#' imagine usung the metadata to create a function that would read a file
#' that compor... | /R/stw_read_write_dataset.R | permissive | kant/steward | R | false | false | 1,788 | r | #' Read or write a steward dataset
#'
#' This will read from or write to a set of files: o CSV file for the data,
#' and a YAML file for the meta-data.
#'
#' At the moment, this provides minimal functionality. In the future, we can
#' imagine usung the metadata to create a function that would read a file
#' that compor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trans-numeric.r
\name{atanh_trans}
\alias{atanh_trans}
\title{Arc-tangent transformation.}
\usage{
atanh_trans()
}
\description{
Arc-tangent transformation.
}
| /man/atanh_trans.Rd | no_license | nemochina2008/scales | R | false | true | 238 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trans-numeric.r
\name{atanh_trans}
\alias{atanh_trans}
\title{Arc-tangent transformation.}
\usage{
atanh_trans()
}
\description{
Arc-tangent transformation.
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paired_t_test.R
\name{paired_t_test}
\alias{paired_t_test}
\title{Paired T-Test}
\usage{
paired_t_test(path, y1, y2)
}
\arguments{
\item{path}{The absolute path of file}
\item{y1}{One of the numeric variable names}
\item{y2}{The other numer... | /man/paired_t_test.Rd | no_license | yaojenkuo/ttestpoc | R | false | true | 549 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paired_t_test.R
\name{paired_t_test}
\alias{paired_t_test}
\title{Paired T-Test}
\usage{
paired_t_test(path, y1, y2)
}
\arguments{
\item{path}{The absolute path of file}
\item{y1}{One of the numeric variable names}
\item{y2}{The other numer... |
#### Preamble ####
# Purpose: Cleaning Census data
# Author: Linxia Li (1005715488), Leyi Wang (1006318682),
# Xingnuo Zhang (1006145306),Yanlin Li (1003770305)
# Data: 3 November 2020
# Contact: tristal.li@mail.utoronto.ca
# License: MIT
# Pre-requisites:
# - Need to run the previous Rscript (1,2)
######... | /Codes/Cleaning data/3. Cleaning-census.R | no_license | Hiraethwly/Forcasting_US_Election | R | false | false | 7,363 | r | #### Preamble ####
# Purpose: Cleaning Census data
# Author: Linxia Li (1005715488), Leyi Wang (1006318682),
# Xingnuo Zhang (1006145306),Yanlin Li (1003770305)
# Data: 3 November 2020
# Contact: tristal.li@mail.utoronto.ca
# License: MIT
# Pre-requisites:
# - Need to run the previous Rscript (1,2)
######... |
library(lme4)
library(plyr)
library(MASS)
narrowData <- subset(hfml, cooperation == 1 || cooperation == 4)
narrowData$cd <- hfml$cooperation == 1
narrowData$ncd <- hfml$cooperation == 4
#shared understanding
narrowData$factorial_shared_understanding <- factor(narrowData$shared_understanding, c(0, -2, -1, 1, 2))
m... | /hfml.R | no_license | lbarberiscanoni/gt4teams_analysis | R | false | false | 1,542 | r | library(lme4)
library(plyr)
library(MASS)
narrowData <- subset(hfml, cooperation == 1 || cooperation == 4)
narrowData$cd <- hfml$cooperation == 1
narrowData$ncd <- hfml$cooperation == 4
#shared understanding
narrowData$factorial_shared_understanding <- factor(narrowData$shared_understanding, c(0, -2, -1, 1, 2))
m... |
test_that("print population", {
expect_snapshot_output(print(ypr_population()))
})
test_that("print populations", {
expect_snapshot_output(print(ypr_populations(Rk = c(2.5, 4.6), Hm = c(0.2, 0.05))))
})
test_that("print ecotypes", {
expect_snapshot_output(print(ypr_ecotypes(Ls = c(10, 15, 20), names = c("river"... | /tests/testthat/test-print.R | permissive | poissonconsulting/ypr | R | false | false | 578 | r | test_that("print population", {
expect_snapshot_output(print(ypr_population()))
})
test_that("print populations", {
expect_snapshot_output(print(ypr_populations(Rk = c(2.5, 4.6), Hm = c(0.2, 0.05))))
})
test_that("print ecotypes", {
expect_snapshot_output(print(ypr_ecotypes(Ls = c(10, 15, 20), names = c("river"... |
library(fgsea)
library(tmod)
source(file.path(PROJECT_DIR, "R/functions/load_sig.r"))
# load CD38 signature genes
fn.cd38.cor = file.path(PROJECT_DIR, "generated_data", "CHI", "robust_corr_all.genes.txt")
df.cd38.cor = fread(fn.cd38.cor, data.table=F)
# load gene stability
fn.stab = file.path(PROJECT_DIR, "generated_... | /R/fgsea_with_btm_modules/chi_CD38_cor_by_ISV_fgsea_BTM.r | permissive | kimjhkp/baseline | R | false | false | 1,397 | r | library(fgsea)
library(tmod)
source(file.path(PROJECT_DIR, "R/functions/load_sig.r"))
# load CD38 signature genes
fn.cd38.cor = file.path(PROJECT_DIR, "generated_data", "CHI", "robust_corr_all.genes.txt")
df.cd38.cor = fread(fn.cd38.cor, data.table=F)
# load gene stability
fn.stab = file.path(PROJECT_DIR, "generated_... |
library(data.table)
library(ggplot2)
# -----------------------------------------------------------------------------
# Functions for making trip images
addWaitTimes <- function(labels, trip) {
if (trip$taxiWaitTime > 0) {
if ('Uber/Lyft' %in% labels) {
gsub('Uber/Lyft', paste('Uber/Ly... | /survey/pilot1/foo.R | no_license | jhelvy/tmfConjoint | R | false | false | 2,267 | r | library(data.table)
library(ggplot2)
# -----------------------------------------------------------------------------
# Functions for making trip images
addWaitTimes <- function(labels, trip) {
if (trip$taxiWaitTime > 0) {
if ('Uber/Lyft' %in% labels) {
gsub('Uber/Lyft', paste('Uber/Ly... |
library(Sleuth3)
### Name: ex1419
### Title: Clever Hans Effect
### Aliases: ex1419
### Keywords: datasets
### ** Examples
str(ex1419)
| /data/genthat_extracted_code/Sleuth3/examples/ex1419.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 159 | r | library(Sleuth3)
### Name: ex1419
### Title: Clever Hans Effect
### Aliases: ex1419
### Keywords: datasets
### ** Examples
str(ex1419)
|
testlist <- list(b = c(-2146628339L, -1667457892L, -852010L, -1131245043L, -1835887972L, -1667457892L, -1667457892L, 202116108L, 202116108L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) | /mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613108862-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 307 | r | testlist <- list(b = c(-2146628339L, -1667457892L, -852010L, -1131245043L, -1835887972L, -1667457892L, -1667457892L, 202116108L, 202116108L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BreakpointGRanges.R
\name{extractReferenceSequence}
\alias{extractReferenceSequence}
\title{Returns the reference sequence around the breakpoint position}
\usage{
extractReferenceSequence(gr, ref, anchoredBases,
followingBases = anchoredBas... | /man/extractReferenceSequence.Rd | no_license | wenmm/StructuralVariantAnnotation | R | false | true | 841 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BreakpointGRanges.R
\name{extractReferenceSequence}
\alias{extractReferenceSequence}
\title{Returns the reference sequence around the breakpoint position}
\usage{
extractReferenceSequence(gr, ref, anchoredBases,
followingBases = anchoredBas... |
install.packages("quantmod")
install.packages("PortfolioAnalytics")
install.packages("PerformanceAnalytics")
library('quantmod')
library('PortfolioAnalytics')
library('PerformanceAnalytics')
start_date <- "2013-08-30"
stock <- getSymbols("AMZN", from = start_date, auto.assign = FALSE)
index <- getSymbols("NDAQ"... | /calculate_beta.R | permissive | nikitaignatov/r-playground | R | false | false | 466 | r | install.packages("quantmod")
install.packages("PortfolioAnalytics")
install.packages("PerformanceAnalytics")
library('quantmod')
library('PortfolioAnalytics')
library('PerformanceAnalytics')
start_date <- "2013-08-30"
stock <- getSymbols("AMZN", from = start_date, auto.assign = FALSE)
index <- getSymbols("NDAQ"... |
#'
#' 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/
#'
#'The goal of this shiny web application is to predict the rating of a breakfast cereal ... | /server.R | no_license | tomschip/DDP_Week4 | R | false | false | 3,028 | 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/
#'
#'The goal of this shiny web application is to predict the rating of a breakfast cereal ... |
#' First Order Derivative of Euclidean norm
#'
#' First Order Derivative of Euclidean norm of vector \code{x} with respect
#' to \code{x}.
#' @param x numeric vector.
#' @return numeric vector of length x.
#' @seealso [D_norm_2nd], [D_norm_3rd], [D_norm_4th]
#' @examples
#' library(numDeriv)
#' func <- function(x) norm... | /R/norm_deriv.R | permissive | tnitithum/matrixFunctions | R | false | false | 3,744 | r | #' First Order Derivative of Euclidean norm
#'
#' First Order Derivative of Euclidean norm of vector \code{x} with respect
#' to \code{x}.
#' @param x numeric vector.
#' @return numeric vector of length x.
#' @seealso [D_norm_2nd], [D_norm_3rd], [D_norm_4th]
#' @examples
#' library(numDeriv)
#' func <- function(x) norm... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/genCov.R
\name{genCov}
\alias{genCov}
\title{produce a coverage plot}
\usage{
genCov(x, txdb, gr, genome, reduce = FALSE, gene.colour = NULL,
gene_name = "Gene", gene.layers = NULL, label.bg_fill = "black",
label.text_fill = "whit... | /man/genCov.Rd | permissive | hjanime/GenVisR | R | false | false | 2,919 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/genCov.R
\name{genCov}
\alias{genCov}
\title{produce a coverage plot}
\usage{
genCov(x, txdb, gr, genome, reduce = FALSE, gene.colour = NULL,
gene_name = "Gene", gene.layers = NULL, label.bg_fill = "black",
label.text_fill = "whit... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/expect-that.r
\name{fail}
\alias{fail}
\title{A default expectation that always fails.}
\usage{
fail(message = "Failure has been forced.")
}
\arguments{
\item{message}{a string to display.}
}
\description{
The fail function forces a t... | /man/fail.Rd | no_license | xeniapardo/testwhat | R | false | false | 452 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/expect-that.r
\name{fail}
\alias{fail}
\title{A default expectation that always fails.}
\usage{
fail(message = "Failure has been forced.")
}
\arguments{
\item{message}{a string to display.}
}
\description{
The fail function forces a t... |
n <- 1000
sig <- 2
x <- rnorm(n,0,2)
B <- 10000
boot<-NULL
for(b in 1:B){
boot.x <- x[sample(1:length(x),length(x),replace=T)]
boot <- c(boot,mean(boot.x))
}
sd(boot)
sig/sqrt(n) | /Statistical Machine Learning/Assignment/타수강생 발표/Example of Bootstrap.R | no_license | hsyliark/HUFS_Statistics_GraduateSchool | R | false | false | 185 | r | n <- 1000
sig <- 2
x <- rnorm(n,0,2)
B <- 10000
boot<-NULL
for(b in 1:B){
boot.x <- x[sample(1:length(x),length(x),replace=T)]
boot <- c(boot,mean(boot.x))
}
sd(boot)
sig/sqrt(n) |
# Example 8.4.2: second library circulation data
lib2<-rep(1:16,c(63526,25653,11855,6055,3264,1727,931,497,275,124,68,28,13,6,9,4))
smooth.test((lib2-1),order=5,distr="geom",method="MLE",B=NULL)
# the output
#
#Smooth goodness-of-fit test
#Null hypothesis: geom against 5 th order alternative
#Nuisance parameter esti... | /Examples_files/Ex8-4-2.R | no_license | CenterForStatistics-UGent/smooth2 | R | false | false | 766 | r | # Example 8.4.2: second library circulation data
lib2<-rep(1:16,c(63526,25653,11855,6055,3264,1727,931,497,275,124,68,28,13,6,9,4))
smooth.test((lib2-1),order=5,distr="geom",method="MLE",B=NULL)
# the output
#
#Smooth goodness-of-fit test
#Null hypothesis: geom against 5 th order alternative
#Nuisance parameter esti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dmbc-package.R
\docType{package}
\name{dmbc-package}
\alias{dmbc-package}
\alias{dmbc-pkg}
\alias{dmbc-p}
\title{Model-Based Clustering of Several Dissimilarity Matrices.}
\description{
The \pkg{dmbc} package implements a Bayesian algorithm f... | /fuzzedpackages/dmbc/man/dmbc-package.Rd | no_license | akhikolla/testpackages | R | false | true | 3,547 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dmbc-package.R
\docType{package}
\name{dmbc-package}
\alias{dmbc-package}
\alias{dmbc-pkg}
\alias{dmbc-p}
\title{Model-Based Clustering of Several Dissimilarity Matrices.}
\description{
The \pkg{dmbc} package implements a Bayesian algorithm f... |
\name{set.populations-methods}
\docType{methods}
\alias{set.populations,GENOME-method}
\alias{set.populations-methods}
\title{Define populations}
\description{
This generic function defines the populations.\cr
Using this function obviates the need to specify the populations for each calculation separately.\cr
The ... | /man/set.populations-methods.Rd | no_license | pievos101/PopGenome | R | false | false | 1,145 | rd | \name{set.populations-methods}
\docType{methods}
\alias{set.populations,GENOME-method}
\alias{set.populations-methods}
\title{Define populations}
\description{
This generic function defines the populations.\cr
Using this function obviates the need to specify the populations for each calculation separately.\cr
The ... |
A <- matrix(1:4, nc=2); eigen(A)
eigen(A, symmetric = TRUE)
| /chap06/eigrn_Decomposition.R | no_license | KSDeng/Mathematical-Modeling-with-R | R | false | false | 62 | r | A <- matrix(1:4, nc=2); eigen(A)
eigen(A, symmetric = TRUE)
|
#' Razor-like template for diagram specification
#'
#' Use Razor-like syntax to define a template for use in a `grViz` diagram.
#'
#' @param spec String spec to be parsed and evaluated.
#' @examples
#' \dontrun{
#' # a simple example to use a LETTER as a node label
#' spec <- "
#' digraph { '@@1' }
#'
#' [1]: LETTER... | /R/spectools.R | permissive | vnijs/DiagrammeR | R | false | false | 4,322 | r | #' Razor-like template for diagram specification
#'
#' Use Razor-like syntax to define a template for use in a `grViz` diagram.
#'
#' @param spec String spec to be parsed and evaluated.
#' @examples
#' \dontrun{
#' # a simple example to use a LETTER as a node label
#' spec <- "
#' digraph { '@@1' }
#'
#' [1]: LETTER... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGeneric.R, R/SparseBrainVector.R,
% R/BrainVector.R
\docType{methods}
\name{takeVolume}
\alias{takeVolume}
\alias{takeVolume,SparseBrainVector,numeric-method}
\alias{takeVolume,BrainVector,numeric-method}
\title{Generic function to extra... | /man/takeVolume-methods.Rd | no_license | bbuchsbaum/neuroim | R | false | true | 1,127 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGeneric.R, R/SparseBrainVector.R,
% R/BrainVector.R
\docType{methods}
\name{takeVolume}
\alias{takeVolume}
\alias{takeVolume,SparseBrainVector,numeric-method}
\alias{takeVolume,BrainVector,numeric-method}
\title{Generic function to extra... |
#main entry function to compute BLS (1998) test of structural break.
main <- function(Y #Y is a matrix or vector which will be lagged by (q) to compute a VAR(q)
, X = NULL #X is a matrix of (contemporaneous) covariates
,... | /main.R | permissive | lnsongxf/multibreak | R | false | false | 6,929 | r | #main entry function to compute BLS (1998) test of structural break.
main <- function(Y #Y is a matrix or vector which will be lagged by (q) to compute a VAR(q)
, X = NULL #X is a matrix of (contemporaneous) covariates
,... |
######################### Developer's functions ##############################
### Functions that can be used by developers. Often these are ###
### are simple wrappers to access slots of the repgrid object. ###
### They are supposd to facilitate adding new functions for ###
... | /R/dev-functions.r | no_license | j4n7/OpenRepGrid | R | false | false | 7,981 | r | ######################### Developer's functions ##############################
### Functions that can be used by developers. Often these are ###
### are simple wrappers to access slots of the repgrid object. ###
### They are supposd to facilitate adding new functions for ###
... |
plotDemogdata <-
function () {
defaults <- list (initial.x = 1, initial.type="functions", initial.datatype="rate",
initial.total = 1, initial.female=0, initial.male=0,
initial.ages = "0:110",initial.years = "1878:2019",initial.trans="TRUE")
dialog.values <- getDialog ("plotDemogdata", defaults... | /R/plotDemogdata.R | no_license | cran/RcmdrPlugin.RiskDemo | R | false | false | 7,463 | r | plotDemogdata <-
function () {
defaults <- list (initial.x = 1, initial.type="functions", initial.datatype="rate",
initial.total = 1, initial.female=0, initial.male=0,
initial.ages = "0:110",initial.years = "1878:2019",initial.trans="TRUE")
dialog.values <- getDialog ("plotDemogdata", defaults... |
#!/usr/bin/Rscript
input <- file('stdin', 'r')
row1 <- readLines(input, n=1)
row2 <- readLines(input, n=1)
row3 <- readLines(input, n=1)
row4 <- readLines(input, n=1)
# row1 <- "250"
# row2 <- "100"
# row3 <- "2.4"
# row4 <- "2.0"
row1 <- as.numeric(row1)
row2 <- as.numeric(row2)
row3 <- as.numeric(row3)
row4 <- as.nu... | /day6/centralLimit2.sh | no_license | jevharr/hacker_stats | R | false | false | 478 | sh | #!/usr/bin/Rscript
input <- file('stdin', 'r')
row1 <- readLines(input, n=1)
row2 <- readLines(input, n=1)
row3 <- readLines(input, n=1)
row4 <- readLines(input, n=1)
# row1 <- "250"
# row2 <- "100"
# row3 <- "2.4"
# row4 <- "2.0"
row1 <- as.numeric(row1)
row2 <- as.numeric(row2)
row3 <- as.numeric(row3)
row4 <- as.nu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_ePIRLS.R
\name{read_ePIRLS}
\alias{read_ePIRLS}
\title{Connect to ePIRLS Data}
\usage{
read_ePIRLS(path, countries, forceReread = FALSE, verbose = TRUE)
}
\arguments{
\item{path}{a character value to the full directory path to t... | /man/read_ePIRLS.Rd | no_license | cran/EdSurvey | R | false | true | 3,326 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_ePIRLS.R
\name{read_ePIRLS}
\alias{read_ePIRLS}
\title{Connect to ePIRLS Data}
\usage{
read_ePIRLS(path, countries, forceReread = FALSE, verbose = TRUE)
}
\arguments{
\item{path}{a character value to the full directory path to t... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 59788
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 59788
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-uniform-dep... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc02-uniform-depth-98/tlc02-uniform-depth-98.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 688 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 59788
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 59788
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-uniform-dep... |
x = c(1:43)
y = c(210,2220,2250,1410,1980,1860,420,1440,1410,1470,2010,1320,2100,2160,780,
630,420,1110,1200,210,360,330,390,510,270,1500,600,240,540,270,450,780,
240,689,420,1200,390,210,2070,300,360,240,240)
barplot(y, names.arg = x, ylab = "Number of observations",
xlab = "Class ID")
| /examples/masterarbeit/r/class_dist_gtsrb.R | permissive | flo257/PySyft | R | false | false | 308 | r | x = c(1:43)
y = c(210,2220,2250,1410,1980,1860,420,1440,1410,1470,2010,1320,2100,2160,780,
630,420,1110,1200,210,360,330,390,510,270,1500,600,240,540,270,450,780,
240,689,420,1200,390,210,2070,300,360,240,240)
barplot(y, names.arg = x, ylab = "Number of observations",
xlab = "Class ID")
|
#first, combine P-N haplotypes
tempdataset <- asv.count.HAB10.enviro %>%
separate(sample, into = c("Site", "Month", "Year", "z")) %>%
mutate(Season = ifelse(Month %in% c("10","11","12","1","2","3"), "Winter", "Summer")) %>%
filter(Taxon %in% c("Pseudonitzschia_d36", "Pseudonitzschia_4e5")) %>%
group_by(Site,... | /Manuscript/BayesianLogisticModels_EcolEnviroCombined/Pseudonitzschia_4e5_d36_together_combinedModels/Pseudonitzschia_d36_combinedModels.R | no_license | ramongallego/Harmful.Algae.eDNA | R | false | false | 4,196 | r | #first, combine P-N haplotypes
tempdataset <- asv.count.HAB10.enviro %>%
separate(sample, into = c("Site", "Month", "Year", "z")) %>%
mutate(Season = ifelse(Month %in% c("10","11","12","1","2","3"), "Winter", "Summer")) %>%
filter(Taxon %in% c("Pseudonitzschia_d36", "Pseudonitzschia_4e5")) %>%
group_by(Site,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{download_sheet}
\alias{download_sheet}
\title{Fetch Sheet from Source}
\usage{
download_sheet(sheet, source = "sheetlabs")
}
\arguments{
\item{sheet}{API to fetch from Sheetlabs}
\item{source}{Key to fetch from \code{Consul} to... | /man/download_sheet.Rd | permissive | ZhangJieYeahBuddy/knowboxr | R | false | true | 573 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{download_sheet}
\alias{download_sheet}
\title{Fetch Sheet from Source}
\usage{
download_sheet(sheet, source = "sheetlabs")
}
\arguments{
\item{sheet}{API to fetch from Sheetlabs}
\item{source}{Key to fetch from \code{Consul} to... |
## Author: Indranil Ghosh, Jadavpur University, Physics Department
## Double Integration using Simpson's 1/3rd Rule
# f <- function(x, y) return(1/(x+y))
f <- function(x, y) return (log(x+2*y))
#f <- function(x, y) return(exp(x+y))
Sm <- function(A, B, C, D, h, k) {
M <- (B-A)/h
N <- (D-C)/k
m <- M+1
... | /numericalAlgorithms/DoubleIntegrationSimpsons.R | no_license | indrag49/Comp-phy | R | false | false | 899 | r | ## Author: Indranil Ghosh, Jadavpur University, Physics Department
## Double Integration using Simpson's 1/3rd Rule
# f <- function(x, y) return(1/(x+y))
f <- function(x, y) return (log(x+2*y))
#f <- function(x, y) return(exp(x+y))
Sm <- function(A, B, C, D, h, k) {
M <- (B-A)/h
N <- (D-C)/k
m <- M+1
... |
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test VendorPlateListResponse")
model.instance <- VendorPlateListResponse$new()
test_that("@context", {
# tests for the property `@context` (array[character])
# The JSON-LD Context is us... | /tests/testthat/test_vendor_plate_list_response.R | no_license | Breeding-Insight/brapi-r-v2 | R | false | false | 1,049 | r | # Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test VendorPlateListResponse")
model.instance <- VendorPlateListResponse$new()
test_that("@context", {
# tests for the property `@context` (array[character])
# The JSON-LD Context is us... |
if (!file.exists("data")){
dir.create('data')
}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv"
download.file(fileUrl,destfile = "./data/microdata06.csv", method='curl')
list.files('./data/')
dateDownloaded <- date()
dateDownloaded
microdata06 <- read.table('./data/microdata06.csv... | /cleaningdata/Quiz1Q1.R | permissive | AM-Caradhras/datasciencecoursera-1 | R | false | false | 342 | r | if (!file.exists("data")){
dir.create('data')
}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv"
download.file(fileUrl,destfile = "./data/microdata06.csv", method='curl')
list.files('./data/')
dateDownloaded <- date()
dateDownloaded
microdata06 <- read.table('./data/microdata06.csv... |
getwd()
data<-read.table("stat/survey_data_2020/survey_data_2020.txt", header=TRUE, sep='\t')
plot(data$height, data$shoe, main="Scatterplot 3a")
# outlier deletion
ish = (data$shoe>400)
ih = (data$height>150)
data = data[!(ish|ih),]
plot(data$height, data$shoe, main="Scatterplot 3a")
cor(data$height, d... | /7th semester/Statistics in Informatics/three.R | no_license | xrisaD/AUEB-Projects | R | false | false | 811 | r | getwd()
data<-read.table("stat/survey_data_2020/survey_data_2020.txt", header=TRUE, sep='\t')
plot(data$height, data$shoe, main="Scatterplot 3a")
# outlier deletion
ish = (data$shoe>400)
ih = (data$height>150)
data = data[!(ish|ih),]
plot(data$height, data$shoe, main="Scatterplot 3a")
cor(data$height, d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stochastic_simulation.R
\name{rbinomial}
\alias{rbinomial}
\title{Simulates from a binomial distribution}
\usage{
rbinomial(size, prob)
}
\arguments{
\item{size}{An integer scalar. The number of trials.}
\item{prob}{A numeric scalar. The p... | /man/rbinomial.Rd | no_license | anhnguyendepocen/stat0002 | R | false | true | 1,067 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stochastic_simulation.R
\name{rbinomial}
\alias{rbinomial}
\title{Simulates from a binomial distribution}
\usage{
rbinomial(size, prob)
}
\arguments{
\item{size}{An integer scalar. The number of trials.}
\item{prob}{A numeric scalar. The p... |
modelInfo <- list(label = "Diagonal Discriminant Analysis",
library = "sparsediscrim",
loop = NULL,
type = "Classification",
parameters = data.frame(parameter = c("model", "shrinkage"),
class = rep("charact... | /models/files/dda.R | no_license | JackStat/caret | R | false | false | 2,211 | r | modelInfo <- list(label = "Diagonal Discriminant Analysis",
library = "sparsediscrim",
loop = NULL,
type = "Classification",
parameters = data.frame(parameter = c("model", "shrinkage"),
class = rep("charact... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22005710310085e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615782755-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 329 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22005710310085e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... |
#' Check cross-references
#' @description Check cross-references that are repetitive or incorrect case.
#' @param filename A LaTeX file
#' @param .report_error The function to provide context to the error.
#' @return NULL
check_xrefs <- function(filename, .report_error){
if (missing(.report_error)){
.report_erro... | /R/check_xrefs.R | no_license | HughParsonage/grattanReporter | R | false | false | 1,952 | r | #' Check cross-references
#' @description Check cross-references that are repetitive or incorrect case.
#' @param filename A LaTeX file
#' @param .report_error The function to provide context to the error.
#' @return NULL
check_xrefs <- function(filename, .report_error){
if (missing(.report_error)){
.report_erro... |
dataset = read.csv('Salary_Data.csv')
#dataset = dataset[, 2:3]
#Splitting the dataset into the training set and Test Set
# install.packages('caTools')
library(caTools)
set.seed(123)
##Aqui ele separa a lógica onde 80% vai ser o meu traning set e 20% o meu test_set
split = sample.split(dataset$Salary, SplitRatio = ... | /Udemy/Machine-Learning-A-Z/Simple_Linear_Regression/Mine_simple_linear_regression.R | no_license | vinipachecov/Machine-Learning | R | false | false | 1,402 | r | dataset = read.csv('Salary_Data.csv')
#dataset = dataset[, 2:3]
#Splitting the dataset into the training set and Test Set
# install.packages('caTools')
library(caTools)
set.seed(123)
##Aqui ele separa a lógica onde 80% vai ser o meu traning set e 20% o meu test_set
split = sample.split(dataset$Salary, SplitRatio = ... |
clin <- read.table("data_files\\sc2_Phase1_CN_Outcome.tsv", sep="\t", header=TRUE, stringsAsFactors=FALSE)
phen <- read.table("data_files\\sc2_Phase1_CN_Phenotype.tsv", sep="\t", header=TRUE, stringsAsFactors=FALSE)
##Transform the phenotypic data into numeric coding for each of the phenotypes
phen[phen==""] <- NA
... | /for_submission/for_submission/PFDA_SC2challengemodel_CN.r | no_license | ROB-Bioinformatics/PrecisionFDA_BrainCancer | R | false | false | 7,032 | r | clin <- read.table("data_files\\sc2_Phase1_CN_Outcome.tsv", sep="\t", header=TRUE, stringsAsFactors=FALSE)
phen <- read.table("data_files\\sc2_Phase1_CN_Phenotype.tsv", sep="\t", header=TRUE, stringsAsFactors=FALSE)
##Transform the phenotypic data into numeric coding for each of the phenotypes
phen[phen==""] <- NA
... |
check <- read.table("D:\\Exercises\\Data\\household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
MyData <- check[check$Date %in% c("1/2/2007","2/2/2007") ,]
globalActivePower <- as.numeric(MyData$Global_active_power)
png("plot1.png", width=480, height=480)
hist(globalActivePower,... | /plot1.R | no_license | susobhangupta/datasciencecoursera | R | false | false | 410 | r | check <- read.table("D:\\Exercises\\Data\\household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
MyData <- check[check$Date %in% c("1/2/2007","2/2/2007") ,]
globalActivePower <- as.numeric(MyData$Global_active_power)
png("plot1.png", width=480, height=480)
hist(globalActivePower,... |
kalmanFilter <- function (input,q,r){
Q <- q
R <- r
P <- 1
X <- 0
size <- length(input)
output <- NULL
itr <- 1
while(itr < size) {
K <- ((P + Q) / (P + Q + R))
P <- (R * (P + Q) / (R + P + Q))
currentResult <-( X +( (input[itr] - X) * K))
X <- currentResult
output <- c(output,currentResult)
... | /R/kalmanFilter.R~ | no_license | RMRanasinghe/stock-market-pattern-recognition-fyp | R | false | false | 622 | kalmanFilter <- function (input,q,r){
Q <- q
R <- r
P <- 1
X <- 0
size <- length(input)
output <- NULL
itr <- 1
while(itr < size) {
K <- ((P + Q) / (P + Q + R))
P <- (R * (P + Q) / (R + P + Q))
currentResult <-( X +( (input[itr] - X) * K))
X <- currentResult
output <- c(output,currentResult)
... | |
setwd('/WORK/lbyybl/WH/rvb/cor_uniq/sample_Ruvbl/Pol2/graph/travel')
R1 <- fread('R1_tss_reads.bed')
R2 <- fread('R2_tss_reads.bed')
merge <- merge(R1,R2,by=c('V1','V2','V3','V4','V5','V6'))
merge <- merge %>%
mutate(sum=V7.x+V7.y) %>%
dplyr::select(V1,V2,V3,V4,V5,V6,sum)
fwrite(merge,'Ruvbl_tss_counts.bed',sep = '... | /ruvb2/chip-seq/Travel_ratio/selecttopandtail.r | no_license | Wenxue-PKU/script | R | false | false | 2,094 | r | setwd('/WORK/lbyybl/WH/rvb/cor_uniq/sample_Ruvbl/Pol2/graph/travel')
R1 <- fread('R1_tss_reads.bed')
R2 <- fread('R2_tss_reads.bed')
merge <- merge(R1,R2,by=c('V1','V2','V3','V4','V5','V6'))
merge <- merge %>%
mutate(sum=V7.x+V7.y) %>%
dplyr::select(V1,V2,V3,V4,V5,V6,sum)
fwrite(merge,'Ruvbl_tss_counts.bed',sep = '... |
url <- "https://www.kaggle.com/datasets"
# Get the links of the pages
my_links <- getHTMLLinks(url)
print(my_links)
| /R_Scripts/aweb_downloading1.R | no_license | thunderpearl/R_Code_ThunderPearl | R | false | false | 122 | r |
url <- "https://www.kaggle.com/datasets"
# Get the links of the pages
my_links <- getHTMLLinks(url)
print(my_links)
|
#Exercise Linear System
#1.
A <- matrix( c(5, -4, -1, 1), 2, 2, TRUE )
a <- c(-10, 2)
w <- solve(A) %*% a
#2.
B <- matrix( c(4, 2, 0, 5, -2, 1, 3, 4, -1), 3, 3, TRUE )
b <- c(2, 7, 3)
x <- solve(B) %*% b
#3.
C <- matrix( c(1, 1, 1, 2, 3, 5, 4, 0, 5), 3, 3, TRUE)
c <- c(5, 8, 2)
y <- solve(C) %*% c
#4.
D <- mat... | /04_R_Programming_19523118_.R | no_license | gffaza/SPL_Matlan | R | false | false | 413 | r | #Exercise Linear System
#1.
A <- matrix( c(5, -4, -1, 1), 2, 2, TRUE )
a <- c(-10, 2)
w <- solve(A) %*% a
#2.
B <- matrix( c(4, 2, 0, 5, -2, 1, 3, 4, -1), 3, 3, TRUE )
b <- c(2, 7, 3)
x <- solve(B) %*% b
#3.
C <- matrix( c(1, 1, 1, 2, 3, 5, 4, 0, 5), 3, 3, TRUE)
c <- c(5, 8, 2)
y <- solve(C) %*% c
#4.
D <- mat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/codes.R
\name{bin_kurtosis}
\alias{bin_kurtosis}
\title{kurtosis of the binomial distribution}
\usage{
bin_kurtosis(trials, prob)
}
\arguments{
\item{trials, }{prob}
}
\value{
kurtosis
}
\description{
calculate the kurtosis
}
\examples{
bin_k... | /binomial/man/bin_kurtosis.Rd | no_license | stat133-sp19/hw-stat133-alextam0317 | R | false | true | 339 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/codes.R
\name{bin_kurtosis}
\alias{bin_kurtosis}
\title{kurtosis of the binomial distribution}
\usage{
bin_kurtosis(trials, prob)
}
\arguments{
\item{trials, }{prob}
}
\value{
kurtosis
}
\description{
calculate the kurtosis
}
\examples{
bin_k... |
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... | /RProgramming/Week2/corr.R | no_license | RobertCPhillips/CourseraJohnHopkinsDataScience | R | false | false | 979 | 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... |
library(grid)
heart <- function(lcolor){t=seq(0, 2*pi, by=0.1)
x=16*sin(t)^3
y=13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
a=(x-min(x))/(max(x)-min(x))
b=(y-min(y))/(max(y)-min(y))
grid.lines(a,b,gp=gpar(col=lcolor,lty = "solid",lwd = 6))}
heart("hotpink")
grid.newpage()
grid.newpage()
pushViewport(viewport(x=0.1, y=0.1,... | /heart.R | no_license | sherr3h/Data-Analysis-R | R | false | false | 461 | r | library(grid)
heart <- function(lcolor){t=seq(0, 2*pi, by=0.1)
x=16*sin(t)^3
y=13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
a=(x-min(x))/(max(x)-min(x))
b=(y-min(y))/(max(y)-min(y))
grid.lines(a,b,gp=gpar(col=lcolor,lty = "solid",lwd = 6))}
heart("hotpink")
grid.newpage()
grid.newpage()
pushViewport(viewport(x=0.1, y=0.1,... |
#############################################################################
#
# spss_varlist(FILE) -- extract info about variables from header of
# FILE, an SPSS for Windows data file (.sav)
#
# Returns an R data.frame object with a row for each variable, columns in this
# frame are:-
# var... | /inst/app/spss_varlist.R | no_license | doc4child/test | R | false | false | 12,334 | r | #############################################################################
#
# spss_varlist(FILE) -- extract info about variables from header of
# FILE, an SPSS for Windows data file (.sav)
#
# Returns an R data.frame object with a row for each variable, columns in this
# frame are:-
# var... |
library(mvtnorm)
bekk.formula <- function(C, A, G, r, H.prev) {
t(C) %*% C + t(A) %*% r %*% t(r) %*% A + t(G) %*% H.prev %*% G
}
| /scratch.R | no_license | nandanrao/bekk | R | false | false | 134 | r | library(mvtnorm)
bekk.formula <- function(C, A, G, r, H.prev) {
t(C) %*% C + t(A) %*% r %*% t(r) %*% A + t(G) %*% H.prev %*% G
}
|
## ----headers------------------------------------------------------------------
system.file(package="Rhtslib", "include")
| /Rhtslib/doc/Rhtslib.R | permissive | solgenomics/R_libs | R | false | false | 124 | r | ## ----headers------------------------------------------------------------------
system.file(package="Rhtslib", "include")
|
library(dslabs)
data("murders")
#working of if else:
a <- 5
if (a>0) {
print(1/a)
} else { print(NA)}
#one more example:
murder_rate <- murders$total/murders$population*100000
ind <- which.min(murder_rate)
if (murder_rate[ind] < 0.5){
print(murders$state[ind])
} else {
print('No other state')
}
if (murder_ra... | /prac6.R | no_license | sgadiyar06/R-basics-and-viz | R | false | false | 965 | r | library(dslabs)
data("murders")
#working of if else:
a <- 5
if (a>0) {
print(1/a)
} else { print(NA)}
#one more example:
murder_rate <- murders$total/murders$population*100000
ind <- which.min(murder_rate)
if (murder_rate[ind] < 0.5){
print(murders$state[ind])
} else {
print('No other state')
}
if (murder_ra... |
#Page Number: 87
library(prob)
library(MASS)
Total <- 120
Maths101 <- 65
French101 <- 75
Both <- 35
A <- Maths101
P_A <- fractions( A / Total)
mathpassprob <- fractions( Maths101 / Total )
frenchpassprob <- fractions( French101 / Total )
bothpassprob <- fractions( Both / Total )
P_B <- mathpassprob... | /Statistics_-_Concepts_And_Applications_by_Nabendu_Pal_And_Sahadeb_Sarkar/CH6/EX6.15/Ex6_15.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 482 | r | #Page Number: 87
library(prob)
library(MASS)
Total <- 120
Maths101 <- 65
French101 <- 75
Both <- 35
A <- Maths101
P_A <- fractions( A / Total)
mathpassprob <- fractions( Maths101 / Total )
frenchpassprob <- fractions( French101 / Total )
bothpassprob <- fractions( Both / Total )
P_B <- mathpassprob... |
#Principal component analysis and clustering on wine data
#loading the data
install.packages("xlsx")
wine_pca <- princomp(wine[,2:14], cor = T, covmat = NULL, scores = T)
summary(wine_pca)
wine_pca$scores
plot(wine_pca$scores[,1:3], col = "Blue", pch = 10, cex = 0.3, lwd = 3)
text(wine_pca$scores[,1:3], labels... | /PCA_Assignment.R | no_license | nitin1411/Data-Science-with-R | R | false | false | 1,523 | r | #Principal component analysis and clustering on wine data
#loading the data
install.packages("xlsx")
wine_pca <- princomp(wine[,2:14], cor = T, covmat = NULL, scores = T)
summary(wine_pca)
wine_pca$scores
plot(wine_pca$scores[,1:3], col = "Blue", pch = 10, cex = 0.3, lwd = 3)
text(wine_pca$scores[,1:3], labels... |
# Copyright 2019 Observational Health Data Sciences and Informatics
#
# This file is part of PPIandH2RACovid19Complication
#
# 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... | /Covid19ComplicationPPIandH2RA/R/CreateAllCohorts.R | permissive | ohdsi-studies/Covid19PPIandH2RA | R | false | false | 6,124 | r | # Copyright 2019 Observational Health Data Sciences and Informatics
#
# This file is part of PPIandH2RACovid19Complication
#
# 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... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_numeric_columns.R
\name{extract_numeric_columns}
\alias{extract_numeric_columns}
\title{extract_numeric_columns}
\usage{
extract_numeric_columns(dataset, isCSV = FALSE, columns = NULL,
row_names = FALSE, with_bool = FALSE, header = ... | /man/extract_numeric_columns.Rd | no_license | ronybsulca/numericColumns | R | false | true | 2,647 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_numeric_columns.R
\name{extract_numeric_columns}
\alias{extract_numeric_columns}
\title{extract_numeric_columns}
\usage{
extract_numeric_columns(dataset, isCSV = FALSE, columns = NULL,
row_names = FALSE, with_bool = FALSE, header = ... |
#Q2 - Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008?
require("data.table")
#Load Data
if (!file.exists("exdata_data_household_power_consumption.zip"))
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip",
"... | /plot2.R | no_license | the-tourist-/ExploratoryDataAnaylysisWeek3 | R | false | false | 1,259 | r | #Q2 - Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008?
require("data.table")
#Load Data
if (!file.exists("exdata_data_household_power_consumption.zip"))
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip",
"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcwlPipelines-package.R
\docType{package}
\name{RcwlPipelines}
\alias{RcwlPipelines}
\alias{RcwlPipelines-package}
\title{RcwlPipelines}
\description{
A package for a collection of Rcwl pipelines. Currently four
pipeplines have been collected... | /man/RcwlPipelines.Rd | no_license | marcogao2019/RcwlPipelines | R | false | true | 647 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcwlPipelines-package.R
\docType{package}
\name{RcwlPipelines}
\alias{RcwlPipelines}
\alias{RcwlPipelines-package}
\title{RcwlPipelines}
\description{
A package for a collection of Rcwl pipelines. Currently four
pipeplines have been collected... |
context("Test that sc_get_data is pulling in StreamCat API data")
test_that("st_get_data for a sample COMID returns a data frame", {
df <- sc_get_data(metric='PctUrbMd2006,pctconif2008,
rddens', aoi='catchment,watershed',
comid='179,1337,1337420... | /tests/testthat/test-sc_getdata.R | permissive | USEPA/StreamCatTools | R | false | false | 762 | r | context("Test that sc_get_data is pulling in StreamCat API data")
test_that("st_get_data for a sample COMID returns a data frame", {
df <- sc_get_data(metric='PctUrbMd2006,pctconif2008,
rddens', aoi='catchment,watershed',
comid='179,1337,1337420... |
#' BFinterpretation
#'
#' This function uses Wagenmakers' (2011) interpretation of Bayes Factors for the purpose of Bayesian hypothesis testing
#' @param BF Bayes Factor to be interpreted.
#' @export
#' @examples
#' BFinterpretation(10.7)
#'
BFinterpretation <- function(BF){
BFtext <- ifelse(BF > 100, "extreme evide... | /R/BFinterpretation.r | no_license | ianhussey/timesavers | R | false | false | 1,314 | r | #' BFinterpretation
#'
#' This function uses Wagenmakers' (2011) interpretation of Bayes Factors for the purpose of Bayesian hypothesis testing
#' @param BF Bayes Factor to be interpreted.
#' @export
#' @examples
#' BFinterpretation(10.7)
#'
BFinterpretation <- function(BF){
BFtext <- ifelse(BF > 100, "extreme evide... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
#This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(xMatrix=matrix()) {
m <- NULL
... | /cachematrix.R | no_license | ahmetkalafat/ProgrammingAssignment2 | R | false | false | 1,307 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
#This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(xMatrix=matrix()) {
m <- NULL
... |
#addition attempt two (proposes two new breakpoints and scores - bigger min, bigger max, then random)
k_ends_test = c(1,50,60)
barMake2<-function(k_ends, prob_of_doing_random, count){
#allowing for the option of doing a random addition
u = runif(1) #random number from 0-1 from uniform distribution
if(u < pr... | /old_crap/Attempts_at_add_sub/Addition/addition_attempt_two.R | no_license | codeAligned/REU2018 | R | false | false | 3,019 | r | #addition attempt two (proposes two new breakpoints and scores - bigger min, bigger max, then random)
k_ends_test = c(1,50,60)
barMake2<-function(k_ends, prob_of_doing_random, count){
#allowing for the option of doing a random addition
u = runif(1) #random number from 0-1 from uniform distribution
if(u < pr... |
\name{spatgraphs-runif3d}
\alias{runif3d}
\title{runif3d}
\description{
Simple simulation of uniform 3d point pattern.
}
\usage{
runif3d(n = c(10), window = list(x = c(0, 1), y = c(0, 1), z = c(0, 1)))
}
\arguments{
\item{n}{Vector of point counts, e.g. c(10,10) is two type pattern with 10 points per type.}
\item{wi... | /man/spatgraphs-runif3d.Rd | no_license | fdzul/spatgraphs | R | false | false | 449 | rd | \name{spatgraphs-runif3d}
\alias{runif3d}
\title{runif3d}
\description{
Simple simulation of uniform 3d point pattern.
}
\usage{
runif3d(n = c(10), window = list(x = c(0, 1), y = c(0, 1), z = c(0, 1)))
}
\arguments{
\item{n}{Vector of point counts, e.g. c(10,10) is two type pattern with 10 points per type.}
\item{wi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_starry.R
\docType{data}
\name{cabinet_turnover}
\alias{cabinet_turnover}
\title{Two Years In, Turnover In Trump’s Cabinet Is Still Historically High}
\format{A data frame with 312 rows representing cabinet members and 7 variables:
\descr... | /man/cabinet_turnover.Rd | no_license | Elaineyex/fivethirtyeight | R | false | true | 995 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_starry.R
\docType{data}
\name{cabinet_turnover}
\alias{cabinet_turnover}
\title{Two Years In, Turnover In Trump’s Cabinet Is Still Historically High}
\format{A data frame with 312 rows representing cabinet members and 7 variables:
\descr... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/item_rm.R
\name{item_rm}
\alias{item_rm}
\title{Remove item from SB}
\usage{
item_rm(id, session = current_session())
}
\arguments{
\item{id}{item ID}
\item{session}{Session object from \code{\link{authenticate_sb}}}
}
\value{
TRUE t... | /man/item_rm.Rd | permissive | mhines-usgs/sbtools | R | false | false | 378 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/item_rm.R
\name{item_rm}
\alias{item_rm}
\title{Remove item from SB}
\usage{
item_rm(id, session = current_session())
}
\arguments{
\item{id}{item ID}
\item{session}{Session object from \code{\link{authenticate_sb}}}
}
\value{
TRUE t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggdag.R
\name{ggdag}
\alias{ggdag}
\title{Quickly plot a DAG in ggplot2}
\usage{
ggdag(.tdy_dag, ...)
}
\arguments{
\item{.tdy_dag}{input graph, an object of class \code{tidy_dagitty} or
\code{dagitty}}
\item{...}{additional arguments passed... | /man/ggdag.Rd | permissive | zhaoxiaohe/ggdag | R | false | true | 667 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggdag.R
\name{ggdag}
\alias{ggdag}
\title{Quickly plot a DAG in ggplot2}
\usage{
ggdag(.tdy_dag, ...)
}
\arguments{
\item{.tdy_dag}{input graph, an object of class \code{tidy_dagitty} or
\code{dagitty}}
\item{...}{additional arguments passed... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MeanCol.R
\name{MeanCol}
\alias{MeanCol}
\title{Calculate arithmetical mean}
\usage{
MeanCol(df)
}
\arguments{
\item{df}{Numeric 2 dimension table}
}
\value{
Good way: numeric vector - arithmetical means of every
column input table
Bad way: ... | /man/MeanCol.Rd | no_license | Ortem-a/mypackage | R | false | true | 572 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MeanCol.R
\name{MeanCol}
\alias{MeanCol}
\title{Calculate arithmetical mean}
\usage{
MeanCol(df)
}
\arguments{
\item{df}{Numeric 2 dimension table}
}
\value{
Good way: numeric vector - arithmetical means of every
column input table
Bad way: ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_utils.R
\name{gg_wrapper}
\alias{gg_wrapper}
\title{Set/Modify ggplot2 Components}
\usage{
gg_wrapper(..., facet_r = NULL, facet_c = NULL, facet_scale = "fixed",
facet_space = "fixed", is_x_continuous = TRUE, is_y_continuous = TRUE,
... | /man/gg_wrapper.Rd | no_license | statech/CommonPlots | R | false | true | 1,367 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_utils.R
\name{gg_wrapper}
\alias{gg_wrapper}
\title{Set/Modify ggplot2 Components}
\usage{
gg_wrapper(..., facet_r = NULL, facet_c = NULL, facet_scale = "fixed",
facet_space = "fixed", is_x_continuous = TRUE, is_y_continuous = TRUE,
... |
#' Upload local files to Google Cloud Storage
#'
#' Upload images or tables to Google Cloud Storage
#'
#' @param x Character. filename.
#' @param bucket bucket name you are uploading to
#' @param predefinedAcl Specify user access to object. Passed to
#' \code{googleCloudStorageR::gcs_upload}.
#' @param quiet Logical. S... | /R/utils-upload.R | permissive | r-spatial/rgee | R | false | false | 20,583 | r | #' Upload local files to Google Cloud Storage
#'
#' Upload images or tables to Google Cloud Storage
#'
#' @param x Character. filename.
#' @param bucket bucket name you are uploading to
#' @param predefinedAcl Specify user access to object. Passed to
#' \code{googleCloudStorageR::gcs_upload}.
#' @param quiet Logical. S... |
train_input=read.csv("train.csv")#read input file
test_input=read.csv("test.csv")
train=train_input
test=test_input
cat_var <- names(train)[which(sapply(train, is.factor))]#all factor variables
#cc=which(sapply(train[,],is.factor)) or this can be used
#cat_var2=colnames(train)[cc]#instead of the above line
numeric_var... | /houses.R | no_license | Deepesh87/House-PricePrediction | R | false | false | 10,295 | r | train_input=read.csv("train.csv")#read input file
test_input=read.csv("test.csv")
train=train_input
test=test_input
cat_var <- names(train)[which(sapply(train, is.factor))]#all factor variables
#cc=which(sapply(train[,],is.factor)) or this can be used
#cat_var2=colnames(train)[cc]#instead of the above line
numeric_var... |
rm(list = ls())
suppressPackageStartupMessages({
library(DESeq2)
library(ggplot2)
library(dplyr)
library(tidyverse)
library(d3heatmap)
library(Rcpp)
library(hciR)
library(hciRdata)
library(htmlwidgets)
})
load("bulk_seq_tidy.rds")
#DDS object
bm_cd8_pre_dds <- deseq_from_tibble(cd8_bm_pre_count, cd... | /DESeq2_hci_caseVScontrol/DESeq2_caseVSctrl_preBM_CD8.R | no_license | france-hub/bulk_RNA_IRproject | R | false | false | 1,103 | r | rm(list = ls())
suppressPackageStartupMessages({
library(DESeq2)
library(ggplot2)
library(dplyr)
library(tidyverse)
library(d3heatmap)
library(Rcpp)
library(hciR)
library(hciRdata)
library(htmlwidgets)
})
load("bulk_seq_tidy.rds")
#DDS object
bm_cd8_pre_dds <- deseq_from_tibble(cd8_bm_pre_count, cd... |
context("Crop image")
# crop_image_secondary function
testthat::test_that("the crop_image_secondary function returns an error if height and width is greater than the initial dimensions of the image", {
out_array = matrix(runif(100), 10, 10)
testthat::expect_error(crop_image_secondary(out_array, 11, 11))
})
... | /OpenImageR/tests/testthat/test-crop_image.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 5,080 | r | context("Crop image")
# crop_image_secondary function
testthat::test_that("the crop_image_secondary function returns an error if height and width is greater than the initial dimensions of the image", {
out_array = matrix(runif(100), 10, 10)
testthat::expect_error(crop_image_secondary(out_array, 11, 11))
})
... |
\name{colVars}
\alias{colVars}
\title{Column Variances}
\description{
Computes variances by column.
}
\usage{
colVars(x, na.rm = FALSE, unbiased = TRUE, SumSquares = FALSE)
}
\arguments{
\item{x}{A matrix, array, or data frame}
\item{na.rm}{Logical value indicating that missing values be omitted from the
calc... | /man/colVars.Rd | no_license | brian-j-smith/boa | R | false | false | 425 | rd | \name{colVars}
\alias{colVars}
\title{Column Variances}
\description{
Computes variances by column.
}
\usage{
colVars(x, na.rm = FALSE, unbiased = TRUE, SumSquares = FALSE)
}
\arguments{
\item{x}{A matrix, array, or data frame}
\item{na.rm}{Logical value indicating that missing values be omitted from the
calc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/osn-impala.R
\name{arrivals_impala_osn}
\alias{arrivals_impala_osn}
\title{Get arrivals at airport}
\usage{
arrivals_impala_osn(session, apt, wef, til = NULL)
}
\arguments{
\item{session}{SSH session to OSN Impala}
\item{apt}{ICAO ID of airp... | /man/arrivals_impala_osn.Rd | no_license | caverject10/trrrj | R | false | true | 2,077 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/osn-impala.R
\name{arrivals_impala_osn}
\alias{arrivals_impala_osn}
\title{Get arrivals at airport}
\usage{
arrivals_impala_osn(session, apt, wef, til = NULL)
}
\arguments{
\item{session}{SSH session to OSN Impala}
\item{apt}{ICAO ID of airp... |
library(DeclareDesign)
library(tidyverse)
library(here)
load(here("cluster-ses","sims.rda"))
summary(sims$estimand)
summary_sims <- sims %>% group_by(estimator_label) %>% summarize(coverage = mean(estimand <= conf.high & estimand >= conf.low),
pow = mean(p.value < .05),
bias = mean( estimand - estimate),sd_... | /cluster-ses/summarize_sims_old.R | no_license | jwbowers/standards_discussions | R | false | false | 412 | r |
library(DeclareDesign)
library(tidyverse)
library(here)
load(here("cluster-ses","sims.rda"))
summary(sims$estimand)
summary_sims <- sims %>% group_by(estimator_label) %>% summarize(coverage = mean(estimand <= conf.high & estimand >= conf.low),
pow = mean(p.value < .05),
bias = mean( estimand - estimate),sd_... |
.strReverse <- function(x) {
bb <- lapply(strsplit(x, NULL), rev)
vapply(bb, paste, character(1), collapse = "")
}
.reverseSingleSeq <- function(fasta, revLab = "REV_"){
name <- getName(fasta)
Annot <- getAnnot(fasta)
revseq <- .strReverse(fasta)
return(as.SeqFastaAA(revseq, Annot = paste(">", revLab, gsu... | /R/reverseSeq.R | no_license | protViz/prozor | R | false | false | 1,395 | r | .strReverse <- function(x) {
bb <- lapply(strsplit(x, NULL), rev)
vapply(bb, paste, character(1), collapse = "")
}
.reverseSingleSeq <- function(fasta, revLab = "REV_"){
name <- getName(fasta)
Annot <- getAnnot(fasta)
revseq <- .strReverse(fasta)
return(as.SeqFastaAA(revseq, Annot = paste(">", revLab, gsu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iotwireless_operations.R
\name{iotwireless_list_wireless_devices}
\alias{iotwireless_list_wireless_devices}
\title{Lists the wireless devices registered to your AWS account}
\usage{
iotwireless_list_wireless_devices(MaxResults, NextToken,
D... | /paws/man/iotwireless_list_wireless_devices.Rd | permissive | sanchezvivi/paws | R | false | true | 1,402 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iotwireless_operations.R
\name{iotwireless_list_wireless_devices}
\alias{iotwireless_list_wireless_devices}
\title{Lists the wireless devices registered to your AWS account}
\usage{
iotwireless_list_wireless_devices(MaxResults, NextToken,
D... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_sheet_data}
\alias{get_sheet_data}
\title{Get data from excel files}
\usage{
get_sheet_data(file, sheet)
}
\arguments{
\item{file}{The file name}
\item{sheet}{The sheet name}
}
\description{
This function gets all the data ... | /man/get_sheet_data.Rd | permissive | CIP-RIU/traittools | R | false | true | 340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_sheet_data}
\alias{get_sheet_data}
\title{Get data from excel files}
\usage{
get_sheet_data(file, sheet)
}
\arguments{
\item{file}{The file name}
\item{sheet}{The sheet name}
}
\description{
This function gets all the data ... |
backtest <- function(historical.price, days, r, d, coupon, sigma, initial.price, management.fee, c) {
k1 <- c * historical.price[1,1] # Strike price of first put
k2 <- c * historical.price[126,1] # Strike price of second put
k3 <- c * historical.price[252,1] # Strik3 price of third put
k4 <- c * historical... | /backtest.source.R | no_license | Jacobhob/ARK-Fund | R | false | false | 7,003 | r | backtest <- function(historical.price, days, r, d, coupon, sigma, initial.price, management.fee, c) {
k1 <- c * historical.price[1,1] # Strike price of first put
k2 <- c * historical.price[126,1] # Strike price of second put
k3 <- c * historical.price[252,1] # Strik3 price of third put
k4 <- c * historical... |
mdist <-
function(x,y){
m=length(x)
n=length(y)
if(m!=n){
cat("Error: dimensions do not match","\n")
return (-1)
}
out=0
for (i in 1:n){
deltax=as.numeric(I(x[i]!=0))
deltay=as.numeric(I(y[i]!=0))
out=out+as.numeric(I(deltax!=deltay))+(x[i]-y[i])^2
}
out=sqrt(out)
return(out)
}
| /KMDA/R/mdist.R | no_license | ingted/R-Examples | R | false | false | 297 | r | mdist <-
function(x,y){
m=length(x)
n=length(y)
if(m!=n){
cat("Error: dimensions do not match","\n")
return (-1)
}
out=0
for (i in 1:n){
deltax=as.numeric(I(x[i]!=0))
deltay=as.numeric(I(y[i]!=0))
out=out+as.numeric(I(deltax!=deltay))+(x[i]-y[i])^2
}
out=sqrt(out)
return(out)
}
|
library(NISTunits)
### Name: NISTpintUSdryTOliter
### Title: Convert pint to liter
### Aliases: NISTpintUSdryTOliter
### Keywords: programming
### ** Examples
NISTpintUSdryTOliter(10)
| /data/genthat_extracted_code/NISTunits/examples/NISTpintUSdryTOliter.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 191 | r | library(NISTunits)
### Name: NISTpintUSdryTOliter
### Title: Convert pint to liter
### Aliases: NISTpintUSdryTOliter
### Keywords: programming
### ** Examples
NISTpintUSdryTOliter(10)
|
#' Make percentiles for chart
#'
#' @param data tibble
#' @param var variable to take the mean and median of
#' @param n number of ntiles, defaults to 100 for percentiles
#' @param ... grouping variables, optional
#'
#' @return tibble
#' @export
#' @importFrom dplyr group_by mutate summarize ungroup ntile
#' @importFro... | /funcs.R | no_license | economic-opportunity/shinyeoq | R | false | false | 5,779 | r | #' Make percentiles for chart
#'
#' @param data tibble
#' @param var variable to take the mean and median of
#' @param n number of ntiles, defaults to 100 for percentiles
#' @param ... grouping variables, optional
#'
#' @return tibble
#' @export
#' @importFrom dplyr group_by mutate summarize ungroup ntile
#' @importFro... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rapport.R
\name{resume.cp}
\alias{resume.cp}
\title{resume du vecteur CODE_POSTAL (cp)}
\usage{
summary.cp(vx)
}
\arguments{
\item{vx}{vecteur char CODE_POSTAL}
}
\value{
- nb de CP renseignés
- nb de résidents alsaciens
- n... | /Routines_Package/Rpu2.Rcheck/00_pkg_src/Rpu2/man/resume.cp.Rd | no_license | jcrb/RPU_Doc | R | false | true | 501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rapport.R
\name{resume.cp}
\alias{resume.cp}
\title{resume du vecteur CODE_POSTAL (cp)}
\usage{
summary.cp(vx)
}
\arguments{
\item{vx}{vecteur char CODE_POSTAL}
}
\value{
- nb de CP renseignés
- nb de résidents alsaciens
- n... |
## header ======================================================================
# purpose: check data issues
# author: Zoey Hu
# create date: 06/01/2018
# last update: //2018
#
# notation:
# - *: things to be consider while proceed to code; pitfalls
# - %: techniques
# - -: notes, numbers
... | /2_checkdata_v0.R | no_license | sycamorehu/csearch | R | false | false | 1,696 | r | ## header ======================================================================
# purpose: check data issues
# author: Zoey Hu
# create date: 06/01/2018
# last update: //2018
#
# notation:
# - *: things to be consider while proceed to code; pitfalls
# - %: techniques
# - -: notes, numbers
... |
\name{cookfarm}
\docType{data}
\encoding{latin1}
\alias{cookfarm}
\title{The Cook Agronomy Farm data set}
\description{The \href{https://data.nal.usda.gov/dataset/data-field-scale-sensor-network-data-set-monitoring-and-modeling-spatial-and-temporal-variation-soil-moisture-dryland-agricultural-field}{R.J. Cook Agronomy ... | /man/cookfarm.Rd | no_license | iSDA-Africa/landmap | R | false | false | 4,915 | rd | \name{cookfarm}
\docType{data}
\encoding{latin1}
\alias{cookfarm}
\title{The Cook Agronomy Farm data set}
\description{The \href{https://data.nal.usda.gov/dataset/data-field-scale-sensor-network-data-set-monitoring-and-modeling-spatial-and-temporal-variation-soil-moisture-dryland-agricultural-field}{R.J. Cook Agronomy ... |
##### RE-Analysis post-1st review
# The Free Clinics Rain Water Harvester monitoring data
## Visualizing data
require("ggplot2") # Powerful and aesthetic plotting system for R
require("gridExtra") # Arrange multiple ggplots in same figure (multi-panels)
require("scales") #
require("RColorBrewer") # create... | /TFC-analysis.R | no_license | simonsaysgregg/TFC-RWH | R | false | false | 29,467 | r | ##### RE-Analysis post-1st review
# The Free Clinics Rain Water Harvester monitoring data
## Visualizing data
require("ggplot2") # Powerful and aesthetic plotting system for R
require("gridExtra") # Arrange multiple ggplots in same figure (multi-panels)
require("scales") #
require("RColorBrewer") # create... |
census = read.csv("census.csv")
library(caTools)
set.seed(2000)
spl = sample.split(census$over50k, SplitRatio = 0.6)
train = subset(census, spl == TRUE)
test = subset(census, spl == FALSE)
logmodel = glm(over50k ~ ., data = train, family = binomial)
summary(logmodel)
predlog = predict(logmodel, newdata = test, type ... | /Unit-4/Assignment/census.R | no_license | praveenvvstgy/15.071x-The-Analytics-Edge | R | false | false | 1,953 | r | census = read.csv("census.csv")
library(caTools)
set.seed(2000)
spl = sample.split(census$over50k, SplitRatio = 0.6)
train = subset(census, spl == TRUE)
test = subset(census, spl == FALSE)
logmodel = glm(over50k ~ ., data = train, family = binomial)
summary(logmodel)
predlog = predict(logmodel, newdata = test, type ... |
1.#####################数据框转换为igraph
library(igraph)
df<-data.frame(a=c(1,2,3,4,5,3,6),b=c(2,3,4,5,6,4,5))
g<-graph.data.frame(df,directed = FALSE)
g<-simplify(g,remove.multiple = TRUE,remove.loops = TRUE)
simp_df <- as.data.frame(get.edgelist(g)) #as_data_frame(g)
#2.简单统计
#e边数
ecount(g)
#节点数目
vcount(g)
#获取特定节点
V(g)[... | /igraph_test.R | no_license | Zefeng-Wu/R-script | R | false | false | 4,011 | r | 1.#####################数据框转换为igraph
library(igraph)
df<-data.frame(a=c(1,2,3,4,5,3,6),b=c(2,3,4,5,6,4,5))
g<-graph.data.frame(df,directed = FALSE)
g<-simplify(g,remove.multiple = TRUE,remove.loops = TRUE)
simp_df <- as.data.frame(get.edgelist(g)) #as_data_frame(g)
#2.简单统计
#e边数
ecount(g)
#节点数目
vcount(g)
#获取特定节点
V(g)[... |
\name{fit_FPK_multiple_clades_different_V_different_sig2}
\alias{fit_FPK_multiple_clades_different_V_different_sig2}
\alias{fit_BBMV_multiple_clades_different_V_different_sig2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Fit independent models in several clades.}
\description{
This function ... | /man/fit_FPK_multiple_clades_different_V_different_sig2.Rd | no_license | cran/BBMV | R | false | false | 3,756 | rd | \name{fit_FPK_multiple_clades_different_V_different_sig2}
\alias{fit_FPK_multiple_clades_different_V_different_sig2}
\alias{fit_BBMV_multiple_clades_different_V_different_sig2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Fit independent models in several clades.}
\description{
This function ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Pubmed.R
\docType{methods}
\name{getPublicationList}
\alias{getPublicationList}
\alias{getPublicationList,character-method}
\title{Gather NIH Pubmed Data}
\usage{
getPublicationList(query)
\S4method{getPublicationList}{character}(query)
}
\a... | /man/getPublicationList.Rd | no_license | cran/ungeneanno | R | false | true | 803 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Pubmed.R
\docType{methods}
\name{getPublicationList}
\alias{getPublicationList}
\alias{getPublicationList,character-method}
\title{Gather NIH Pubmed Data}
\usage{
getPublicationList(query)
\S4method{getPublicationList}{character}(query)
}
\a... |
testlist <- list(hi = 0, lo = 2.51973479379036e-322, mu = 0, sig = 0)
result <- do.call(gjam:::tnormRcpp,testlist)
str(result) | /gjam/inst/testfiles/tnormRcpp/libFuzzer_tnormRcpp/tnormRcpp_valgrind_files/1610046526-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 126 | r | testlist <- list(hi = 0, lo = 2.51973479379036e-322, mu = 0, sig = 0)
result <- do.call(gjam:::tnormRcpp,testlist)
str(result) |
#-----------------------Code Description---------------------------------------#
# Notes:
# ver1.0, data: 20180810, by MaoYan
#
# Description:
# ShenNJ客车通过性分析数据导入。
#------------------------------------------------------------------------------#
library(data.table)
library(ggplot2)
library(gridExtra)
options(scipen = ... | /DataInput.R | no_license | githubmao/ShenNJ | R | false | false | 4,271 | r | #-----------------------Code Description---------------------------------------#
# Notes:
# ver1.0, data: 20180810, by MaoYan
#
# Description:
# ShenNJ客车通过性分析数据导入。
#------------------------------------------------------------------------------#
library(data.table)
library(ggplot2)
library(gridExtra)
options(scipen = ... |
###########################################
# similarity matrix for representing network structure -----------
###########################################
#'
#' @keywords internal
#'
#' @export
similarityMatrix=function(group1X,group2X,cortype="spearman",othertype=NULL,adjpower=1){
#group1X: gene expression matrix f... | /R/test_modules.R | no_license | arbet003/discoMod | R | false | false | 14,125 | r | ###########################################
# similarity matrix for representing network structure -----------
###########################################
#'
#' @keywords internal
#'
#' @export
similarityMatrix=function(group1X,group2X,cortype="spearman",othertype=NULL,adjpower=1){
#group1X: gene expression matrix f... |
library(nycflights13)
library(gapminder)
library(tidyverse)
# tidyverse contains dplyr which is what we will mainly use
# previously, we used the mlb baseball player data available at
# https://raw.githubusercontent.com/jmgraham30/UoSDataSci/master/code/mlb_data.csv
# to look at how the physical fitness of players var... | /code/codeForDay011.R | no_license | Mclnol16/UoSDataSci | R | false | false | 4,793 | r | library(nycflights13)
library(gapminder)
library(tidyverse)
# tidyverse contains dplyr which is what we will mainly use
# previously, we used the mlb baseball player data available at
# https://raw.githubusercontent.com/jmgraham30/UoSDataSci/master/code/mlb_data.csv
# to look at how the physical fitness of players var... |
library(magrittr)
library(raster)
| /R/libs.R | no_license | msandifo/reproscir | R | false | false | 36 | r | library(magrittr)
library(raster)
|
dataFile<-"household_power_consumption.txt"
data <- read.table(dataFile, header= TRUE, sep = ";", dec = ".")
subsetData <- data[data$Date %in% c("1/2/2007", "2/2/2007") ,]
datetime <- strptime(paste(subsetData$Date, subsetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
globalActivePower <- as.numeric(subSetData$Global_acti... | /plot3.R | no_license | attilabartha/Exploratory-Data-Analysis | R | false | false | 844 | r | dataFile<-"household_power_consumption.txt"
data <- read.table(dataFile, header= TRUE, sep = ";", dec = ".")
subsetData <- data[data$Date %in% c("1/2/2007", "2/2/2007") ,]
datetime <- strptime(paste(subsetData$Date, subsetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
globalActivePower <- as.numeric(subSetData$Global_acti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.