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 |
|---|---|---|---|---|---|---|---|---|---|
if (!require(shiny)) {install.packages("shiny")}; library(shiny)
if (!require(shinythemes)) {install.packages("shinythemes")}; library(shinythemes)
if (!require(dplyr)) {install.packages("dplyr")}; library(dplyr)
if (!require(fastDummies)) {install.packages("fastDummies")}; library(fastDummies)
if (!require(Hmisc)... | /dependencies.R | no_license | yogesh1612/data_pre-process_shinyapp | R | false | false | 1,133 | r |
if (!require(shiny)) {install.packages("shiny")}; library(shiny)
if (!require(shinythemes)) {install.packages("shinythemes")}; library(shinythemes)
if (!require(dplyr)) {install.packages("dplyr")}; library(dplyr)
if (!require(fastDummies)) {install.packages("fastDummies")}; library(fastDummies)
if (!require(Hmisc)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/library.R
\name{md.mvnorm}
\alias{md.mvnorm}
\title{md.mvnorm}
\usage{
md.mvnorm(names, means = rep(0, length(names)), cov = diag(ncol(names)))
}
\arguments{
\item{names}{vector of covariate names}
\item{means}{vector of means, de... | /man/md.mvnorm.Rd | no_license | cran/missDeaths | R | false | true | 793 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/library.R
\name{md.mvnorm}
\alias{md.mvnorm}
\title{md.mvnorm}
\usage{
md.mvnorm(names, means = rep(0, length(names)), cov = diag(ncol(names)))
}
\arguments{
\item{names}{vector of covariate names}
\item{means}{vector of means, de... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xml.R
\name{set_xml_file_helper}
\alias{set_xml_file_helper}
\title{set_xml_file_helper}
\usage{
set_xml_file_helper(xml, fq_name)
}
\arguments{
\item{xml}{The xml pipeline object}
\item{fq_name}{The full path to the XML file}
}
\value{
The ... | /input/gcamdata/man/set_xml_file_helper.Rd | permissive | JGCRI/gcam-core | R | false | true | 378 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xml.R
\name{set_xml_file_helper}
\alias{set_xml_file_helper}
\title{set_xml_file_helper}
\usage{
set_xml_file_helper(xml, fq_name)
}
\arguments{
\item{xml}{The xml pipeline object}
\item{fq_name}{The full path to the XML file}
}
\value{
The ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/windows.R
\name{coverageWindowsCenteredStranded}
\alias{coverageWindowsCenteredStranded}
\title{Get windowed strand-oriented coverages around center points}
\usage{
coverageWindowsCenteredStranded(centers, window.size = 1000, coverage)
}
\arg... | /man/coverageWindowsCenteredStranded.Rd | permissive | musikutiv/tsTools | R | false | true | 694 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/windows.R
\name{coverageWindowsCenteredStranded}
\alias{coverageWindowsCenteredStranded}
\title{Get windowed strand-oriented coverages around center points}
\usage{
coverageWindowsCenteredStranded(centers, window.size = 1000, coverage)
}
\arg... |
#Formacao Cientista de Dados - Fernando Amaral
cluster = kmeans(iris[1:4],centers=3)
table(iris$Species,cluster$cluster)
plot(iris[,1:4],col=cluster$cluster)
set.seed(2014)
cluster = kmeans(iris[1:4],centers=3)
table(iris$Species,cluster$cluster)
plot(iris[,1:4],col=cluster$cluster)cl | /Udemy/Formacao Cientista de Dados/Resources/GERAL/5.1.Kmeans.R | permissive | tarsoqueiroz/Rlang | R | false | false | 296 | r | #Formacao Cientista de Dados - Fernando Amaral
cluster = kmeans(iris[1:4],centers=3)
table(iris$Species,cluster$cluster)
plot(iris[,1:4],col=cluster$cluster)
set.seed(2014)
cluster = kmeans(iris[1:4],centers=3)
table(iris$Species,cluster$cluster)
plot(iris[,1:4],col=cluster$cluster)cl |
#' Extract information from GEO for a given sample
#'
#' This function uses GEOquery to extract information for a given sample. The
#' GEO accession ids for the sample can be found in the study phenotype table.
#'
#' @return Returns a [DataFrame-class][S4Vectors::DataFrame-class] with the information
#' from GEO availa... | /R/geo_info.R | no_license | qtguan/recount | R | false | false | 4,221 | r | #' Extract information from GEO for a given sample
#'
#' This function uses GEOquery to extract information for a given sample. The
#' GEO accession ids for the sample can be found in the study phenotype table.
#'
#' @return Returns a [DataFrame-class][S4Vectors::DataFrame-class] with the information
#' from GEO availa... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/meanEXP0__sex__mnhlth__.r | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 1,643 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
# Clean up
rm(list = ls(all = TRUE))
#Setting the working directory
setwd("~/Desktop/Personal/DataScience/Coursera/8Course- Practical Machine Learning/final project")
# Loading the caret library
library(caret)
# Taken from the assignment to write the files
pml_write_files = function(x){
n = length(x)
... | /PML-Project/model.R | no_license | rastmails/8CourseFinalProject | R | false | false | 2,381 | r | # Clean up
rm(list = ls(all = TRUE))
#Setting the working directory
setwd("~/Desktop/Personal/DataScience/Coursera/8Course- Practical Machine Learning/final project")
# Loading the caret library
library(caret)
# Taken from the assignment to write the files
pml_write_files = function(x){
n = length(x)
... |
answer <- 'Test' | /Microsoft R Demo/MS-R/mrsdeploy/scripts/projectA/test.R | no_license | dem108/Microsoft-R-Demo | R | false | false | 16 | r | answer <- 'Test' |
## All Utterances
# All possible utterances (i.e. object features) that can be handled.
# Here, we assume a 3x3 matrix (three feature types with three expressions each)
allUtterances <- c('cloud', 'circle', 'square', 'solid', 'striped', 'dotted', 'blue', 'red', 'green')
allUtterancesNew1 <- c('cloud', 'circle', 'sq... | /RSA_2019_01/RSA_StratUtt_AllUtterancesAndObjects.R | no_license | gscontras/prior_inference | R | false | false | 5,174 | r | ## All Utterances
# All possible utterances (i.e. object features) that can be handled.
# Here, we assume a 3x3 matrix (three feature types with three expressions each)
allUtterances <- c('cloud', 'circle', 'square', 'solid', 'striped', 'dotted', 'blue', 'red', 'green')
allUtterancesNew1 <- c('cloud', 'circle', 'sq... |
\name{featureselection.meta}
\alias{featureselection.meta}
\title{
Feature selection for meta analysis
}
\description{
Apply univariate Cox regression and aggregate gene Z-scores.
}
\usage{
featureselection.meta(gnExpMat, survivaltime, censor)
}
\arguments{
\item{gnExpMat}{
Matrix of gene expression data.
}
\item{... | /man/featureselection.meta.Rd | no_license | cran/survJamda | R | false | false | 634 | rd | \name{featureselection.meta}
\alias{featureselection.meta}
\title{
Feature selection for meta analysis
}
\description{
Apply univariate Cox regression and aggregate gene Z-scores.
}
\usage{
featureselection.meta(gnExpMat, survivaltime, censor)
}
\arguments{
\item{gnExpMat}{
Matrix of gene expression data.
}
\item{... |
#' module_aglu_L2012.ag_For_Past_bio_input_irr_mgmt
#'
#' Build agriculture, forest, pasture and biomass production inputs for all technologies.
#'
#' @param command API command to execute
#' @param ... other optional parameters, depending on command
#' @return Depends on \code{command}: either a vector of required inp... | /input/gcamdata/R/zchunk_L2012.ag_For_Past_bio_input_irr_mgmt.R | permissive | ashiklom/gcam-core | R | false | false | 29,724 | r | #' module_aglu_L2012.ag_For_Past_bio_input_irr_mgmt
#'
#' Build agriculture, forest, pasture and biomass production inputs for all technologies.
#'
#' @param command API command to execute
#' @param ... other optional parameters, depending on command
#' @return Depends on \code{command}: either a vector of required inp... |
# ---
# repo: r-lib/rlang
# file: standalone-zeallot.R
# last-updated: 2020-11-24
# license: https://unlicense.org
# ---
#
# This drop-in file implements a simple version of zeallot::`%<-%`.
#
# nocov start
`%<-%` <- function(lhs, value) {
lhs <- substitute(lhs)
env <- caller_env()
if (!is_call(lhs, "c")) {
... | /R/standalone-zeallot.R | permissive | markfairbanks/tidytable | R | false | false | 795 | r | # ---
# repo: r-lib/rlang
# file: standalone-zeallot.R
# last-updated: 2020-11-24
# license: https://unlicense.org
# ---
#
# This drop-in file implements a simple version of zeallot::`%<-%`.
#
# nocov start
`%<-%` <- function(lhs, value) {
lhs <- substitute(lhs)
env <- caller_env()
if (!is_call(lhs, "c")) {
... |
\name{GR.Hospitals}
\alias{GR.Hospitals}
\docType{data}
\title{Greek Hospitals}
\description{Locations of General and Specialised Hospitals in Greece.}
\usage{data("GR.Hospitals")}
\format{
A data frame with 132 observations on the following 15 variables.
\describe{
\item{\code{Address}}{character vect... | /man/GR.Hospitals.Rd | no_license | cran/SpatialAcc | R | false | false | 2,554 | rd | \name{GR.Hospitals}
\alias{GR.Hospitals}
\docType{data}
\title{Greek Hospitals}
\description{Locations of General and Specialised Hospitals in Greece.}
\usage{data("GR.Hospitals")}
\format{
A data frame with 132 observations on the following 15 variables.
\describe{
\item{\code{Address}}{character vect... |
library(ggplot2)
library(ggcorrplot)
library(ggalt)
library(ggExtra)
library(ggthemes)
library(ggplotify)
library(treemapify)
library(plyr)
library(dplyr)
library(scales)
library(zoo)
library(lubridate)
Sys.setlocale("LC_ALL", 'pt_BR.UTF-8')
##tema dor ggplot2
seta <- grid::arrow (length = grid::unit(0.2, "cm"), type... | /plots/scatterplot_idade.R | no_license | luizhsalazar/data-visualization | R | false | false | 1,699 | r | library(ggplot2)
library(ggcorrplot)
library(ggalt)
library(ggExtra)
library(ggthemes)
library(ggplotify)
library(treemapify)
library(plyr)
library(dplyr)
library(scales)
library(zoo)
library(lubridate)
Sys.setlocale("LC_ALL", 'pt_BR.UTF-8')
##tema dor ggplot2
seta <- grid::arrow (length = grid::unit(0.2, "cm"), type... |
library(testthat)
library(samplingbook)
test_check("samplingbook")
| /tests/testthat.R | no_license | cran/samplingbook | R | false | false | 72 | r | library(testthat)
library(samplingbook)
test_check("samplingbook")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesianOverlap.R
\name{bayesianOverlap}
\alias{bayesianOverlap}
\title{Calculate the overlap between two ellipses based on their posterior
distributions.}
\usage{
bayesianOverlap(
ellipse1,
ellipse2,
ellipses.posterior,
draws = 10,
... | /man/bayesianOverlap.Rd | no_license | AndrewLJackson/SIBER | R | false | true | 2,013 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesianOverlap.R
\name{bayesianOverlap}
\alias{bayesianOverlap}
\title{Calculate the overlap between two ellipses based on their posterior
distributions.}
\usage{
bayesianOverlap(
ellipse1,
ellipse2,
ellipses.posterior,
draws = 10,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PowerPackage.R
\name{cube}
\alias{cube}
\title{Cube Calculation}
\usage{
cube(x)
}
\arguments{
\item{x}{numeric}
}
\value{
numeric
}
\description{
Cube Calculation
}
\examples{
cube(2)
}
| /man/cube.Rd | no_license | MichaelDiSu/PowerPackage | R | false | true | 265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PowerPackage.R
\name{cube}
\alias{cube}
\title{Cube Calculation}
\usage{
cube(x)
}
\arguments{
\item{x}{numeric}
}
\value{
numeric
}
\description{
Cube Calculation
}
\examples{
cube(2)
}
|
\name{setEdgeLabelColorDirect}
\alias{setEdgeLabelColorDirect}
\alias{setEdgeLabelColorDirect,CytoscapeWindowClass-method}
\title{setEdgeLabelColorDirect}
\description{
In the specified CytoscapeWindow, set the color of the label of the specified
edge or edges.
}
\usage{
setEdgeLabelColorDirect(obj, edge.names, new.val... | /man/setEdgeLabelColorDirect.Rd | no_license | sebastianrossel/Bioconductor_RCy3_the_new_RCytoscape | R | false | false | 1,208 | rd | \name{setEdgeLabelColorDirect}
\alias{setEdgeLabelColorDirect}
\alias{setEdgeLabelColorDirect,CytoscapeWindowClass-method}
\title{setEdgeLabelColorDirect}
\description{
In the specified CytoscapeWindow, set the color of the label of the specified
edge or edges.
}
\usage{
setEdgeLabelColorDirect(obj, edge.names, new.val... |
### Rscript /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/format_4Metal.R /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/AA.CHIP_EWAS.swan.rda /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/AA_CHIP_EWAS.SWAN.tsv
## Rscript /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/format_4Metal.R /broad/hptmp/mesbah/DNAm/April5_2021... | /Scripts/meta_analysis/format_4Metal.R | permissive | MMesbahU/CHIP-EWAS | R | false | false | 1,066 | r | ### Rscript /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/format_4Metal.R /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/AA.CHIP_EWAS.swan.rda /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/AA_CHIP_EWAS.SWAN.tsv
## Rscript /broad/hptmp/mesbah/DNAm/April5_2021/ewasCHIP/format_4Metal.R /broad/hptmp/mesbah/DNAm/April5_2021... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "credit-g")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn = makeLearner("c... | /models/openml_credit-g/classification_class/27becaa837d41b4e8b86ceb633f89135/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 682 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "credit-g")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn = makeLearner("c... |
#' @title Navigate Upstream with Tributaries
#' @description Traverse NHDPlus network upstream with tributaries
#' @param network data.frame NHDPlus flowlines including at a minimum:
#' COMID, Pathlength, LENGTHKM, and Hydroseq.
#' @param comid integer Identifier to start navigating from.
#' @param distance numeric dis... | /R/get_network.R | permissive | hydroinfo-gis/nhdplusTools | R | false | false | 11,844 | r | #' @title Navigate Upstream with Tributaries
#' @description Traverse NHDPlus network upstream with tributaries
#' @param network data.frame NHDPlus flowlines including at a minimum:
#' COMID, Pathlength, LENGTHKM, and Hydroseq.
#' @param comid integer Identifier to start navigating from.
#' @param distance numeric dis... |
# ---
# title: "Untitled"
# author: "wangbinzjcc@qq.com"
# date: "2019/06/27"
# output: html_document
# editor_options:
# chunk_output_type: console
# ---
#```{r}
rm(list = ls())
#```
## package
#```{r}
setwd("F:\\porjects-wangbin\\EAA_pnas")
require(ggplot2)
# devtools::install_github("th... | /R/EAA_6_patchwork_detailed_values_all_plots_20190703.R | no_license | wangbinzjcc/EAAr | R | false | false | 7,509 | r | # ---
# title: "Untitled"
# author: "wangbinzjcc@qq.com"
# date: "2019/06/27"
# output: html_document
# editor_options:
# chunk_output_type: console
# ---
#```{r}
rm(list = ls())
#```
## package
#```{r}
setwd("F:\\porjects-wangbin\\EAA_pnas")
require(ggplot2)
# devtools::install_github("th... |
library("data.table",quietly = T)
tool="Argot"
#cafa_gaf <- argot2_cafa
filter_mixed_gaf <- function(cafa_gaf,tool,config){
cafa_data = read_gaf(cafa_gaf)
print(config$data[["mixed-method"]][[tool]])
score_ths = config$data[["mixed-method"]][[tool]]$score_th
flog.info(score_ths)
flog.info... | /code/R/filter_mixed.r | permissive | Dill-PICL/GOMAP | R | false | false | 769 | r | library("data.table",quietly = T)
tool="Argot"
#cafa_gaf <- argot2_cafa
filter_mixed_gaf <- function(cafa_gaf,tool,config){
cafa_data = read_gaf(cafa_gaf)
print(config$data[["mixed-method"]][[tool]])
score_ths = config$data[["mixed-method"]][[tool]]$score_th
flog.info(score_ths)
flog.info... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "qsar-biodeg")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner... | /models/openml_qsar-biodeg/classification_Class/ccab95989c097ff5257ab9bdb6a4d594/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 754 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "qsar-biodeg")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner... |
# Exercise 2: indexing and filtering vectors
# Create a vector `first_ten` that has the values 10 through 20 in it (using
# the : operator)
first_ten <- 10:20
# Create a vector `next_ten` that has the values 21 through 30 in it (using the
# seq() function)
next_ten <- seq(21, 30)
# Create a vector `all_numbers` by... | /chapter-07-exercises/exercise-2/exercise.R | permissive | krislee1204/book-exercises | R | false | false | 1,640 | r | # Exercise 2: indexing and filtering vectors
# Create a vector `first_ten` that has the values 10 through 20 in it (using
# the : operator)
first_ten <- 10:20
# Create a vector `next_ten` that has the values 21 through 30 in it (using the
# seq() function)
next_ten <- seq(21, 30)
# Create a vector `all_numbers` by... |
#Download file
if(!file.exists("data")){dir.create("data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="data\\powerconsumption.zip")
#Unzips the file
unzip(zipfile="./data/powerconsumption.zip",exdir="./data")
#Loading Files into R... | /Course4/Assignment1/Plot2.R | no_license | kdbode/DataScience-CourseraCourses | R | false | false | 993 | r | #Download file
if(!file.exists("data")){dir.create("data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="data\\powerconsumption.zip")
#Unzips the file
unzip(zipfile="./data/powerconsumption.zip",exdir="./data")
#Loading Files into R... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caching.R
\name{ridl_memoise_clear}
\alias{ridl_memoise_clear}
\title{Clear memory cache used to memoise ridl functions}
\usage{
ridl_memoise_clear()
}
\description{
Clear memory cache used to memoise ridl functions
}
| /man/ridl_memoise_clear.Rd | permissive | UNHCRmdl/ridl-1 | R | false | true | 296 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caching.R
\name{ridl_memoise_clear}
\alias{ridl_memoise_clear}
\title{Clear memory cache used to memoise ridl functions}
\usage{
ridl_memoise_clear()
}
\description{
Clear memory cache used to memoise ridl functions
}
|
library(naivebayes)
library(dplyr)
library (ggplot2)
library(psych)
Entrance=read.csv(file.choose(),sep=",",header=TRUE)
str(Entrance)
summary(Entrance)
Entrance$admit=factor(Entrance$admit,levels=c(0,1),labels=c("No","YES"))
Entrance$rank=as.factor(Entrance$rank)
pairs.panels(Entrance[,-1])
Entrance ... | /NAIVE BAYES ON ENTRANCETEST.R | no_license | stdntlfe/R-Machine-Learning-Algorithms | R | false | false | 877 | r | library(naivebayes)
library(dplyr)
library (ggplot2)
library(psych)
Entrance=read.csv(file.choose(),sep=",",header=TRUE)
str(Entrance)
summary(Entrance)
Entrance$admit=factor(Entrance$admit,levels=c(0,1),labels=c("No","YES"))
Entrance$rank=as.factor(Entrance$rank)
pairs.panels(Entrance[,-1])
Entrance ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/processPhotoId.R
\name{processPhotoId}
\alias{processPhotoId}
\title{Process Photo ID}
\usage{
processPhotoId(file_path = "", idType = "auto", imageSource = "auto",
correctOrientation = "true", correctSkew = "true",
description = "", pdfP... | /man/processPhotoId.Rd | permissive | KrishAK47/abbyyR | R | false | true | 1,224 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/processPhotoId.R
\name{processPhotoId}
\alias{processPhotoId}
\title{Process Photo ID}
\usage{
processPhotoId(file_path = "", idType = "auto", imageSource = "auto",
correctOrientation = "true", correctSkew = "true",
description = "", pdfP... |
## This is assignment 2
makeCacheMatrix <- function(x = matrix()) {
if(!is.matrix(x)) {
message("Please input a matrix")
} else {
m.original <<- x
getm.o <<- function() x
m.inverse <<- solve(x)
getm.i <-
}
... | /as2.R | no_license | hybeeson/datasciencecoursera | R | false | false | 473 | r | ## This is assignment 2
makeCacheMatrix <- function(x = matrix()) {
if(!is.matrix(x)) {
message("Please input a matrix")
} else {
m.original <<- x
getm.o <<- function() x
m.inverse <<- solve(x)
getm.i <-
}
... |
library(data.table)
data1 <- fread('./data/raw/Iowa_Liquor_Sales.csv', header = T, sep = ',', verbose=TRUE)
data1$DATE <- as.Date(data1$DATE, "%m/%d/%Y")
data1$ZIPCODE <- factor(data1$ZIPCODE, ordered=F)
data1$`STATE BTL COST` <- sapply(strsplit(data1$`STATE BTL COST`, split='$', fixed=TRUE), function(x) (x[2]))
data1$... | /project/R/EDA_project_analysis.R | no_license | alejio/Udacity-EDA-draft | R | false | false | 7,020 | r | library(data.table)
data1 <- fread('./data/raw/Iowa_Liquor_Sales.csv', header = T, sep = ',', verbose=TRUE)
data1$DATE <- as.Date(data1$DATE, "%m/%d/%Y")
data1$ZIPCODE <- factor(data1$ZIPCODE, ordered=F)
data1$`STATE BTL COST` <- sapply(strsplit(data1$`STATE BTL COST`, split='$', fixed=TRUE), function(x) (x[2]))
data1$... |
setwd('/Users/peiboxu/Desktop/merge-seq analysis/')
library(tidyverse)
library(ggpubr)
### ### ### ### ### ###
### start from here ###
### ### ### ### ### ###
valid_cells_names=c('AI_valid','DMS_valid','MD_valid','BLA_valid','LH_valid')
#exn_meta=read.csv('exn_meta_valid.csv',row.names = 1)
exn_meta... | /figure2&S2/figureS2F/projection_motif_by_4_mice.R | no_license | MichaelPeibo/MERGE-seq-analysis | R | false | false | 6,587 | r |
setwd('/Users/peiboxu/Desktop/merge-seq analysis/')
library(tidyverse)
library(ggpubr)
### ### ### ### ### ###
### start from here ###
### ### ### ### ### ###
valid_cells_names=c('AI_valid','DMS_valid','MD_valid','BLA_valid','LH_valid')
#exn_meta=read.csv('exn_meta_valid.csv',row.names = 1)
exn_meta... |
library(shiny)
library(ggplot2)
library(nycflights13)
library(data.table)
flights$date<-as.Date(paste(flights$year, flights$month, flights$day, sep = '-'))
flightsDT <- data.table(flights)
shinyServer(function(input, output) {
#flghts<-flights[flights$month>=input$startmonth,]
... | /Server.R | no_license | Zsopi/shiny | R | false | false | 1,093 | r | library(shiny)
library(ggplot2)
library(nycflights13)
library(data.table)
flights$date<-as.Date(paste(flights$year, flights$month, flights$day, sep = '-'))
flightsDT <- data.table(flights)
shinyServer(function(input, output) {
#flghts<-flights[flights$month>=input$startmonth,]
... |
#data_raw is the data frame including information that should be in one row being split up
#into two rows. In this example, a student needed the number of several events per soccer
#game (e.g. shots or passes) but collected them per team in different rows. For sure, a
#problem which can happen with different types of d... | /combine_rows_for_split_up_observations.R | no_license | PostdOK/data_cleaning_helpers_R | R | false | false | 2,688 | r | #data_raw is the data frame including information that should be in one row being split up
#into two rows. In this example, a student needed the number of several events per soccer
#game (e.g. shots or passes) but collected them per team in different rows. For sure, a
#problem which can happen with different types of d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_head_bucket}
\alias{s3_head_bucket}
\title{This operation is useful to determine if a bucket exists and you have
permission to access it}
\usage{
s3_head_bucket(Bucket)
}
\arguments{
\item{Bucket}{[required]}
}
\descr... | /paws/man/s3_head_bucket.Rd | permissive | peoplecure/paws | R | false | true | 641 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3_operations.R
\name{s3_head_bucket}
\alias{s3_head_bucket}
\title{This operation is useful to determine if a bucket exists and you have
permission to access it}
\usage{
s3_head_bucket(Bucket)
}
\arguments{
\item{Bucket}{[required]}
}
\descr... |
##Download and unzip the data
###create the "data" directory
if (!dir.exists("./data")){
dir.create("./data")
}
###Download zip file
if (!file.exists("./data/householdpowerconsumption.zip")){
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
downlo... | /plot1.R | no_license | srhumir/ExData_Plotting1 | R | false | false | 1,540 | r | ##Download and unzip the data
###create the "data" directory
if (!dir.exists("./data")){
dir.create("./data")
}
###Download zip file
if (!file.exists("./data/householdpowerconsumption.zip")){
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
downlo... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ca-scoreFACT_V.R
\name{scoreFACT_V}
\alias{scoreFACT_V}
\title{Score the FACT-V}
\usage{
scoreFACT_V(df, updateItems = FALSE, keepNvalid = FALSE)
}
\arguments{
\item{df}{A data frame with the FACT-V items, appropriately-named... | /man/scoreFACT_V.Rd | no_license | cran/FACTscorer | R | false | false | 5,607 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ca-scoreFACT_V.R
\name{scoreFACT_V}
\alias{scoreFACT_V}
\title{Score the FACT-V}
\usage{
scoreFACT_V(df, updateItems = FALSE, keepNvalid = FALSE)
}
\arguments{
\item{df}{A data frame with the FACT-V items, appropriately-named... |
df<-read.csv("temperatures.csv")
df
men<-df$temp[df$gender=="Male"]
women<-df$temp[df$gender=="Female"]
t.test(men,women,mu=0)
t.test(men-women,mu=0)
head(df)
hist(df$temp,breaks=50)
tapply(df$temp,df$gender,mean)
tapply(df$temp,df$gender,summary)
men<-df$temp[df$gender=="Male"]
women<-df$temp[df$gender=="Female"]
pa... | /csv/csvvvv/Hypothesis_Testing.R | no_license | Roger7410/R_Data_Mining | R | false | false | 724 | r | df<-read.csv("temperatures.csv")
df
men<-df$temp[df$gender=="Male"]
women<-df$temp[df$gender=="Female"]
t.test(men,women,mu=0)
t.test(men-women,mu=0)
head(df)
hist(df$temp,breaks=50)
tapply(df$temp,df$gender,mean)
tapply(df$temp,df$gender,summary)
men<-df$temp[df$gender=="Male"]
women<-df$temp[df$gender=="Female"]
pa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cross_predixcan.R
\name{load_expression}
\alias{load_expression}
\title{Load predicted expression files fro ma folder}
\usage{
load_expression(folder, white_list = NULL, metaxcan_style = FALSE)
}
\description{
Load predicted expression files ... | /ratools/man/load_expression.Rd | permissive | hakyimlab/metaxcan-paper | R | false | true | 336 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cross_predixcan.R
\name{load_expression}
\alias{load_expression}
\title{Load predicted expression files fro ma folder}
\usage{
load_expression(folder, white_list = NULL, metaxcan_style = FALSE)
}
\description{
Load predicted expression files ... |
yaml <- '
default:
db_name: dbase
databases:
db1: !expr paste0(db_name, "/one")
db2: !expr paste0(db_name, "/two")
staging:
staging_postfix: _staging
db_name: dbase
databases:
db1: !expr paste0(db_name, staging_postfix, "/one")
db2: !expr paste0(db_name, staging_postfix, "/two")
'
# Ensure ... | /inst/examples/example_with_config.R | no_license | rstudio/config | R | false | false | 710 | r |
yaml <- '
default:
db_name: dbase
databases:
db1: !expr paste0(db_name, "/one")
db2: !expr paste0(db_name, "/two")
staging:
staging_postfix: _staging
db_name: dbase
databases:
db1: !expr paste0(db_name, staging_postfix, "/one")
db2: !expr paste0(db_name, staging_postfix, "/two")
'
# Ensure ... |
#Copyright © 2016 RTE Réseau de transport d’électricité
#' View the content of an antares output
#'
#' This function displays each element of an \code{antaresData} object in a
#' spreadsheet-like viewer.
#'
#' @param x
#' An object of class \code{antaresData}, generated by the function
#' \code{\link{readAnta... | /R/viewAntares.R | no_license | cran/antaresRead | R | false | false | 1,333 | r | #Copyright © 2016 RTE Réseau de transport d’électricité
#' View the content of an antares output
#'
#' This function displays each element of an \code{antaresData} object in a
#' spreadsheet-like viewer.
#'
#' @param x
#' An object of class \code{antaresData}, generated by the function
#' \code{\link{readAnta... |
#' Show landscape metrics
#'
#' @description Show landscape metrics on patch level printed in their corresponding patch.
#'
#' @param landscape *Raster object
#' @param what Patch level what to plot
#' @param class How to show the labeled patches: "global" (single map), "all" (every class as facet),
#' or a vect... | /R/show_lsm.R | no_license | cran/landscapemetrics | R | false | false | 7,173 | r | #' Show landscape metrics
#'
#' @description Show landscape metrics on patch level printed in their corresponding patch.
#'
#' @param landscape *Raster object
#' @param what Patch level what to plot
#' @param class How to show the labeled patches: "global" (single map), "all" (every class as facet),
#' or a vect... |
d <- read.table("household_power_consumption.txt", sep=";", header=TRUE)
d<- d[d$Date=="1/2/2007" | d$Date=="2/2/2007",]
#Plot1
png(file = "plot1.png", width = 480, height = 480)
hist(d$Global_active_power,col="red", breaks = 12, main ="Global Active Power", xlab = "Global Active Power (kilowatts)",ylab = "Frequency")... | /plot1.R | no_license | Tatiana10/ExData_Plotting1 | R | false | false | 330 | r | d <- read.table("household_power_consumption.txt", sep=";", header=TRUE)
d<- d[d$Date=="1/2/2007" | d$Date=="2/2/2007",]
#Plot1
png(file = "plot1.png", width = 480, height = 480)
hist(d$Global_active_power,col="red", breaks = 12, main ="Global Active Power", xlab = "Global Active Power (kilowatts)",ylab = "Frequency")... |
## The two functions below are used to demonstrate the principle of caching
## expensive calculations witin an R object that also contains the target data.
## makeCacheMatrix creates a special matrix that is capable of storing/caching
## its own inverse matrix (the matrix x is assumned to be square & invertable)
make... | /cachematrix.R | no_license | SoundGeeza/ProgrammingAssignment2 | R | false | false | 1,068 | r | ## The two functions below are used to demonstrate the principle of caching
## expensive calculations witin an R object that also contains the target data.
## makeCacheMatrix creates a special matrix that is capable of storing/caching
## its own inverse matrix (the matrix x is assumned to be square & invertable)
make... |
## Quick R script to conduct monte carlo null model test for the number of steps on a phylogenetic tree
library(ape)
library(phangorn)
# Here's a 32 taxon tree with a basal split between 8 and 24 taxon clades:
t32=read.tree(text="((((t30:1,t23:1):1,(t32:1,(t19:1,(t11:1,t24:1):1):1):1):1,((((t26:1,t14:1):1,(((t21:1,t2... | /lect/lect16.R | no_license | wf8/ib200 | R | false | false | 3,352 | r | ## Quick R script to conduct monte carlo null model test for the number of steps on a phylogenetic tree
library(ape)
library(phangorn)
# Here's a 32 taxon tree with a basal split between 8 and 24 taxon clades:
t32=read.tree(text="((((t30:1,t23:1):1,(t32:1,(t19:1,(t11:1,t24:1):1):1):1):1,((((t26:1,t14:1):1,(((t21:1,t2... |
library(gcookbook)
ggplot(cabbage_exp,aes(x=Date,y=Weight,fill=Cultivar))+geom_bar(position="dodge",stat="identity",colour="black")+scale_fill_brewer(palette="Pastell") | /3-05.r | no_license | wenbin5243/r | R | false | false | 168 | r | library(gcookbook)
ggplot(cabbage_exp,aes(x=Date,y=Weight,fill=Cultivar))+geom_bar(position="dodge",stat="identity",colour="black")+scale_fill_brewer(palette="Pastell") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mean_sd.R
\name{mean_sd}
\alias{mean_sd}
\title{Summarise a numerical vector to mean (SD).}
\usage{
mean_sd(...)
}
\arguments{
\item{x}{Numerical vector}
\item{digits}{Number of decimals to use}
}
\value{
Character vector
}
\description{
Sum... | /man/mean_sd.Rd | no_license | jaspervanm/JasperTools | R | false | true | 466 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mean_sd.R
\name{mean_sd}
\alias{mean_sd}
\title{Summarise a numerical vector to mean (SD).}
\usage{
mean_sd(...)
}
\arguments{
\item{x}{Numerical vector}
\item{digits}{Number of decimals to use}
}
\value{
Character vector
}
\description{
Sum... |
library(FSelector)
data(iris)
# se obtienen las medidas mediante ganancia de informacion
weights <- FSelector::information.gain(Species~., iris)
# se muestran los pesos y se seleccionan los mejores
print(weights)
subset <- FSelector::cutoff.k(weights,2)
f <- as.simple.formula(subset,"Species")
print(f)
# igual, pero... | /Minería de datos. Preprocesamiento y clasificacion/preprocesamiento/fSelector-entropy.R | permissive | Tiburtzio/Master-Ciencias-de-Datos-UGR | R | false | false | 532 | r | library(FSelector)
data(iris)
# se obtienen las medidas mediante ganancia de informacion
weights <- FSelector::information.gain(Species~., iris)
# se muestran los pesos y se seleccionan los mejores
print(weights)
subset <- FSelector::cutoff.k(weights,2)
f <- as.simple.formula(subset,"Species")
print(f)
# igual, pero... |
library(ggplot2)
library(rgl)
wh<-read.table(file='WaitTimesPerHour.csv',sep=',',header=TRUE)
attach(wh)
names(wh)
wd<-read.table(file='WaitTimesPerDay.csv',sep=',',header=TRUE)
attach(wd)
names(wd)
g <- ggplot(wh, aes(x = AvgWait, y= Count)) + geom_point(aes(color=Hour)) + facet_wrap(~ Airport)
g
ggplot(wh, aes(x =... | /r-data/wait-times/hrd31.R | no_license | hardikgw/elastic-node | R | false | false | 5,629 | r | library(ggplot2)
library(rgl)
wh<-read.table(file='WaitTimesPerHour.csv',sep=',',header=TRUE)
attach(wh)
names(wh)
wd<-read.table(file='WaitTimesPerDay.csv',sep=',',header=TRUE)
attach(wd)
names(wd)
g <- ggplot(wh, aes(x = AvgWait, y= Count)) + geom_point(aes(color=Hour)) + facet_wrap(~ Airport)
g
ggplot(wh, aes(x =... |
setwd("D:\\lhac\\analysis\\Rtmp")
library(VennDiagram)
f1="RNAi"
f2="RNAi"
a<- read.csv(paste(f1,"B2normal-DEG.csv",sep=""))
b<- read.csv(paste(f2,"B1normal-DEG.csv",sep=""))
a1<-a[,1]
b1<-b[,1]
set<-list(a=a1,b=b1)
names(set)<-c(f1,f2)
venn.diagram(set,fill=c("red","blue"),paste(f1,"B2vsB1",f2,"out.tiff",sep=""))
... | /R_coder/VenneB1vsB2.R | no_license | lhaclove/MyCode | R | false | false | 392 | r | setwd("D:\\lhac\\analysis\\Rtmp")
library(VennDiagram)
f1="RNAi"
f2="RNAi"
a<- read.csv(paste(f1,"B2normal-DEG.csv",sep=""))
b<- read.csv(paste(f2,"B1normal-DEG.csv",sep=""))
a1<-a[,1]
b1<-b[,1]
set<-list(a=a1,b=b1)
names(set)<-c(f1,f2)
venn.diagram(set,fill=c("red","blue"),paste(f1,"B2vsB1",f2,"out.tiff",sep=""))
... |
#' Easier-to-use function for grabbing a block of data out of a Raster*.
#'
#' @param x Raster* Some input Raster* object.
#' @param r1 Numeric. The start row of the chunk.
#' @param r2 Numeric. The end row of the chunk.
#' @param c1 Numeric. The start column of the chunk.
#' @param c2 Numeric. The end row of th... | /R/getValuesBlock_enhanced.R | no_license | gearslaboratory/spatial.tools | R | false | false | 3,805 | r | #' Easier-to-use function for grabbing a block of data out of a Raster*.
#'
#' @param x Raster* Some input Raster* object.
#' @param r1 Numeric. The start row of the chunk.
#' @param r2 Numeric. The end row of the chunk.
#' @param c1 Numeric. The start column of the chunk.
#' @param c2 Numeric. The end row of th... |
#' Machine learning made easy
#'
#' @description Prepare data and train machine learning models.
#'
#' @param d A data frame
#' @param ... Columns to be ignored in model training, e.g. ID columns,
#' unquoted.
#' @param outcome Name of the target column, i.e. what you want to predict.
#' Unquoted. Must be named, i.... | /R/machine_learn.R | permissive | hughvnguyen/healthcareai-r | R | false | false | 4,616 | r | #' Machine learning made easy
#'
#' @description Prepare data and train machine learning models.
#'
#' @param d A data frame
#' @param ... Columns to be ignored in model training, e.g. ID columns,
#' unquoted.
#' @param outcome Name of the target column, i.e. what you want to predict.
#' Unquoted. Must be named, i.... |
###############################################
# GSERM 2017 Day Five a.m.
#
# File created June 23, 2017
#
# File last updated June 23, 2017
###############################################
# Set working directory as necessary:
#
setwd("~/Dropbox (Personal)/GSERM/Materials 2017/Notes and Slides")
#
require(RCurl)
# O... | /Code/GSERM-2017-Day-5-am.R | no_license | anhnguyendepocen/GSERM-2017-git | R | false | false | 7,278 | r | ###############################################
# GSERM 2017 Day Five a.m.
#
# File created June 23, 2017
#
# File last updated June 23, 2017
###############################################
# Set working directory as necessary:
#
setwd("~/Dropbox (Personal)/GSERM/Materials 2017/Notes and Slides")
#
require(RCurl)
# O... |
context("G20 data frame")
test_that("G20 data frame is present", {
expect_equal(
names(G20),
c(
"region",
"country",
"gdp_mil_usd",
"hdi",
"econ_classification",
"hemisphere"
)
)
expect_equal(nrow(G20), 20)
})
| /tests/testthat/test_G20.R | no_license | wilkox/treemapify | R | false | false | 265 | r | context("G20 data frame")
test_that("G20 data frame is present", {
expect_equal(
names(G20),
c(
"region",
"country",
"gdp_mil_usd",
"hdi",
"econ_classification",
"hemisphere"
)
)
expect_equal(nrow(G20), 20)
})
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manip.r
\name{slice}
\alias{slice}
\alias{slice_}
\title{Select rows by position.}
\usage{
slice(.data, ...)
slice_(.data, ..., .dots)
}
\arguments{
\item{.data}{A tbl. All main verbs are S3 generics and provide methods
for \code{\link{tbl_d... | /man/slice.Rd | no_license | ravinpoudel/dplyr | R | false | true | 1,343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manip.r
\name{slice}
\alias{slice}
\alias{slice_}
\title{Select rows by position.}
\usage{
slice(.data, ...)
slice_(.data, ..., .dots)
}
\arguments{
\item{.data}{A tbl. All main verbs are S3 generics and provide methods
for \code{\link{tbl_d... |
cov_stamp = raster::stack("~/development/aoa_disassembly/tests/testdata/aqb_stamp.grd")
cov_all = raster::stack("data/covariates/predictors.grd")
cov_stamp_v = getValues(cov_all)
m1 = readRDS("data/models/model_allvars_juelichcv.RDS")
p1 = predSD(m1, cov_all)
raster::plot(p1)
writeRaster(p1, "data/predictionSDs/sd... | /src/pred_sd.R | no_license | LOEK-RS/aqbench_ml | R | false | false | 1,651 | r |
cov_stamp = raster::stack("~/development/aoa_disassembly/tests/testdata/aqb_stamp.grd")
cov_all = raster::stack("data/covariates/predictors.grd")
cov_stamp_v = getValues(cov_all)
m1 = readRDS("data/models/model_allvars_juelichcv.RDS")
p1 = predSD(m1, cov_all)
raster::plot(p1)
writeRaster(p1, "data/predictionSDs/sd... |
#' Epidemic Algorithm for detection of multivariate outliers in incomplete survey data
#'
#' In \code{EAdet} an epidemic is started at a center of the data. The epidemic
#' spreads out and infects neighbouring points (probabilistically or deterministically).
#' The last points infected are outliers. After running \... | /R/EAdet.R | no_license | cran/modi | R | false | false | 15,483 | r | #' Epidemic Algorithm for detection of multivariate outliers in incomplete survey data
#'
#' In \code{EAdet} an epidemic is started at a center of the data. The epidemic
#' spreads out and infects neighbouring points (probabilistically or deterministically).
#' The last points infected are outliers. After running \... |
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
library(rmarkdown)
render(args[1], md_document(variant = 'gfm', preserve_yaml=TRUE))
| /scripts/processRmds.R | no_license | bartek-blog/bartek-blog.github.io | R | false | false | 147 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
library(rmarkdown)
render(args[1], md_document(variant = 'gfm', preserve_yaml=TRUE))
|
revenue.dea <- function(base = NULL, frontier = NULL,
noutput = 1, output.price = NULL) {
## output.price: c(p1', p2', ..., ps')
if(is.null(frontier))
frontier <- base
if(!is.null(base) & !is.null(frontier)){
base <- as.matrix(base)
frontier <- as.matrix(frontier)
}
... | /R/revenue_dea.r | no_license | cran/nonparaeff | R | false | false | 1,852 | r | revenue.dea <- function(base = NULL, frontier = NULL,
noutput = 1, output.price = NULL) {
## output.price: c(p1', p2', ..., ps')
if(is.null(frontier))
frontier <- base
if(!is.null(base) & !is.null(frontier)){
base <- as.matrix(base)
frontier <- as.matrix(frontier)
}
... |
#' Install / Uninstall GluonTS
#'
#' @description
#' `install_gluonts()`: Installs `GluonTS` Probabilisitic Deep Learning Time Series Forecasting Software
#' using `reticulate::py_install()`.
#'
#' - A `Python` Environment will be created named `r-gluonts`.
#' - When loaded with `library(modeltime.gluonts)`, the `model... | /R/core-install.R | permissive | StatMixedML/modeltime.gluonts | R | false | false | 6,548 | r | #' Install / Uninstall GluonTS
#'
#' @description
#' `install_gluonts()`: Installs `GluonTS` Probabilisitic Deep Learning Time Series Forecasting Software
#' using `reticulate::py_install()`.
#'
#' - A `Python` Environment will be created named `r-gluonts`.
#' - When loaded with `library(modeltime.gluonts)`, the `model... |
#!/usr/bin/Rscript
# ©Santiago Sanchez-Ramirez
args <- commandArgs(trailingOnly=TRUE)
if (length(grep("help", args)) != 0){
stop("\n\nTry:\nRscript RplotEBS.R path=PATH/TO/CSV/FILES pattern=.csv trim.x=-2.0 trim.y=0.6 y.eq=TRUE
Defaults: path=. pattern=csv trim.x=NULL trim.y=NULL y.eq=FALSE\n\n")
}
if (length(grep(... | /RplotEBS.R | no_license | santiagosnchez/microsatellites | R | false | false | 4,898 | r | #!/usr/bin/Rscript
# ©Santiago Sanchez-Ramirez
args <- commandArgs(trailingOnly=TRUE)
if (length(grep("help", args)) != 0){
stop("\n\nTry:\nRscript RplotEBS.R path=PATH/TO/CSV/FILES pattern=.csv trim.x=-2.0 trim.y=0.6 y.eq=TRUE
Defaults: path=. pattern=csv trim.x=NULL trim.y=NULL y.eq=FALSE\n\n")
}
if (length(grep(... |
################################################################################
# Copyright 2017-2018 Gabriele Valentini, Douglas G. Moore. All rights reserved.
# Use of this source code is governed by a MIT license that can be found in the
# LICENSE file.
##############################################################... | /tests/testthat/test_entropy_rate.R | permissive | ELIFE-ASU/rinform | R | false | false | 5,298 | r | ################################################################################
# Copyright 2017-2018 Gabriele Valentini, Douglas G. Moore. All rights reserved.
# Use of this source code is governed by a MIT license that can be found in the
# LICENSE file.
##############################################################... |
library(testthat)
library(Dengue)
test_check("Dengue")
| /dengue/pkgs/Dengue/tests/testthat.R | no_license | gwenrino/CSX415.1-project | R | false | false | 56 | r | library(testthat)
library(Dengue)
test_check("Dengue")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dimtrackdata.R
\name{dim.trackdata}
\alias{dim.trackdata}
\alias{dim}
\title{A method of the generic function dim for objects of class 'trackdata'}
\usage{
\method{dim}{trackdata}(x)
}
\arguments{
\item{x}{a track data object}
}
\description{... | /man/dim.trackdata.Rd | no_license | IPS-LMU/emuR | R | false | true | 901 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dimtrackdata.R
\name{dim.trackdata}
\alias{dim.trackdata}
\alias{dim}
\title{A method of the generic function dim for objects of class 'trackdata'}
\usage{
\method{dim}{trackdata}(x)
}
\arguments{
\item{x}{a track data object}
}
\description{... |
#' Add tables to a [`dm`]
#'
#' @description
#' `cdm_add_tbl()` adds one or more tables to a [`dm`].
#' It uses [mutate()] semantics.
#'
#' @return The initial `dm` with the additional table(s).
#'
#' @seealso [cdm_rm_tbl()]
#'
#' @param dm A [`dm`] object.
#' @param ... One or more tables to add to the `dm`.
#' If n... | /R/add-tbl.R | permissive | bbecane/dm | R | false | false | 2,684 | r | #' Add tables to a [`dm`]
#'
#' @description
#' `cdm_add_tbl()` adds one or more tables to a [`dm`].
#' It uses [mutate()] semantics.
#'
#' @return The initial `dm` with the additional table(s).
#'
#' @seealso [cdm_rm_tbl()]
#'
#' @param dm A [`dm`] object.
#' @param ... One or more tables to add to the `dm`.
#' If n... |
##' Subset datasets and extract variables
##'
##' @param x a CrunchDataset
##' @param i As with a \code{data.frame}, there are two cases: (1) if no other
##' arguments are supplied (i.e \code{x[i]}), \code{i} provides for
##' \code{as.list} extraction: columns of the dataset rather than rows. If
##' character, identifi... | /R/dataset-extract.R | no_license | digideskio/rcrunch | R | false | false | 8,788 | r | ##' Subset datasets and extract variables
##'
##' @param x a CrunchDataset
##' @param i As with a \code{data.frame}, there are two cases: (1) if no other
##' arguments are supplied (i.e \code{x[i]}), \code{i} provides for
##' \code{as.list} extraction: columns of the dataset rather than rows. If
##' character, identifi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interface.R
\name{mean_prob_tox}
\alias{mean_prob_tox}
\title{Mean toxicity rate at each dose.}
\usage{
mean_prob_tox(x, ...)
}
\arguments{
\item{x}{Object of class \code{\link{selector}}}
\item{...}{arguments passed to other methods}
}
\val... | /man/mean_prob_tox.Rd | no_license | brockk/escalation | R | false | true | 847 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interface.R
\name{mean_prob_tox}
\alias{mean_prob_tox}
\title{Mean toxicity rate at each dose.}
\usage{
mean_prob_tox(x, ...)
}
\arguments{
\item{x}{Object of class \code{\link{selector}}}
\item{...}{arguments passed to other methods}
}
\val... |
## The two functions "makeCacheMatrix" and "cacheSolve" work in conjunction.
## The first function "makeCacheMatrix" is used to convert the given matrix into a special object and
## returns a list.
## The second function "cacheSolve", using the special object returned by the "makeCacheMatrix" function, computes
## the... | /cachematrix.R | no_license | Rmkkr79/ProgrammingAssignment2 | R | false | false | 1,351 | r | ## The two functions "makeCacheMatrix" and "cacheSolve" work in conjunction.
## The first function "makeCacheMatrix" is used to convert the given matrix into a special object and
## returns a list.
## The second function "cacheSolve", using the special object returned by the "makeCacheMatrix" function, computes
## the... |
library( data.table)
library( raster)
# library( spBayes)
library( disperseR)
library( ggplot2)
library( viridis)
library( lubridate)
library( mgcv)
# library( xgboost)
library( pbmcapply)
`%ni%` <- Negate(`%in%`)
#======================================================================#
## ddm to grid raster
#=======... | /RCode/hyads_to_pm25_functions.R | no_license | lhenneman/HyADS_to_pm25 | R | false | false | 52,533 | r | library( data.table)
library( raster)
# library( spBayes)
library( disperseR)
library( ggplot2)
library( viridis)
library( lubridate)
library( mgcv)
# library( xgboost)
library( pbmcapply)
`%ni%` <- Negate(`%in%`)
#======================================================================#
## ddm to grid raster
#=======... |
#Functions for retrieving data from NEMWEB
#install.packages('tidyverse')
#install.packages('openxlsx')
#install.packages('sqldf')
library(tidyverse)
library(openxlsx)
library(sqldf)
library(data.table)
setwd("C:/Users/Matthew/Google Drive/Uni/19/Thesis/Analysis/Mispricing")
external_data_location <- "D:/Thesis/Data" ... | /R/Old/Functions - USED.R | no_license | MatthewKatzen/NEM_LMP | R | false | false | 2,805 | r | #Functions for retrieving data from NEMWEB
#install.packages('tidyverse')
#install.packages('openxlsx')
#install.packages('sqldf')
library(tidyverse)
library(openxlsx)
library(sqldf)
library(data.table)
setwd("C:/Users/Matthew/Google Drive/Uni/19/Thesis/Analysis/Mispricing")
external_data_location <- "D:/Thesis/Data" ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asymptoticTimings.R
\name{asymptoticTimings}
\alias{asymptoticTimings}
\title{Asymptotic Timings Quantifying function}
\usage{
asymptoticTimings(e, data.sizes, max.seconds)
}
\arguments{
\item{e}{An expression which is in the form of... | /man/asymptoticTimings.Rd | no_license | cran/testComplexity | R | false | true | 1,569 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asymptoticTimings.R
\name{asymptoticTimings}
\alias{asymptoticTimings}
\title{Asymptotic Timings Quantifying function}
\usage{
asymptoticTimings(e, data.sizes, max.seconds)
}
\arguments{
\item{e}{An expression which is in the form of... |
## The following function calculates the inverse of the special matrix created
## with the first function. However, it first checks to see if the inverse matrix has
## already been calculated. If so, it gets the inverse matrix from the cache and skips
## the computation. Otherwise, it calculates the inverse matrix an... | /cachematrix.R | no_license | RaykSchumann/ProgrammingAssignment2 | R | false | false | 1,224 | r | ## The following function calculates the inverse of the special matrix created
## with the first function. However, it first checks to see if the inverse matrix has
## already been calculated. If so, it gets the inverse matrix from the cache and skips
## the computation. Otherwise, it calculates the inverse matrix an... |
# This file split from "test-occSSx.R" 2015-02-20
# test_that code for occSStime functions
# library(testthat)
context("Single-season occupancy, time covars")
test_that("occSStime with logit link", {
# Data set (Blue Ridge Salamanders)
require(wiqid)
data(salamanders)
BRS <- salamanders
# Check dots pass... | /inst/tests/testthat/test-occSStime.R | no_license | mikemeredith/wiqid | R | false | false | 5,998 | r | # This file split from "test-occSSx.R" 2015-02-20
# test_that code for occSStime functions
# library(testthat)
context("Single-season occupancy, time covars")
test_that("occSStime with logit link", {
# Data set (Blue Ridge Salamanders)
require(wiqid)
data(salamanders)
BRS <- salamanders
# Check dots pass... |
library(gapminder)
install.packages('tidyverse')
library(dplyr)
library(magrittr)
library(nycflights13)
#Функция фильтр
filter(gapminder, lifeExp < 29)
filter(gapminder, country == "Afghanistan", year > 1981)
filter(gapminder, continent %in% c("Asia", "Africa"))
#Тоже самое для векторов
gapminder[gapminder$li... | /classwork6/classwork6.R | no_license | DimaLokshteyn/MD-DA-2018 | R | false | false | 2,227 | r | library(gapminder)
install.packages('tidyverse')
library(dplyr)
library(magrittr)
library(nycflights13)
#Функция фильтр
filter(gapminder, lifeExp < 29)
filter(gapminder, country == "Afghanistan", year > 1981)
filter(gapminder, continent %in% c("Asia", "Africa"))
#Тоже самое для векторов
gapminder[gapminder$li... |
## Neural Net
# corre modelos
# librerias y funciones ---------------------------------------------------
source("src/funciones.R")
source("src/load_librerias.R")
# bases ------------------------------------------------------------------
### TRAIN
base_tv <- readRDS(file="data/final/base_train_validation.rds")
#... | /src/modelo_xg.R | no_license | fbetteo/dm-TwitterGender | R | false | false | 2,831 | r | ## Neural Net
# corre modelos
# librerias y funciones ---------------------------------------------------
source("src/funciones.R")
source("src/load_librerias.R")
# bases ------------------------------------------------------------------
### TRAIN
base_tv <- readRDS(file="data/final/base_train_validation.rds")
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_manip.R
\name{data_manip}
\alias{data_manip}
\title{Interactively manipulate master files.}
\usage{
data_manip(use_afs = TRUE, update = FALSE, data = NULL)
}
\arguments{
\item{use_afs}{Use master files from AFS}
\item{update}{Update AFS... | /man/data_manip.Rd | no_license | nverno/iclean | R | false | true | 480 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_manip.R
\name{data_manip}
\alias{data_manip}
\title{Interactively manipulate master files.}
\usage{
data_manip(use_afs = TRUE, update = FALSE, data = NULL)
}
\arguments{
\item{use_afs}{Use master files from AFS}
\item{update}{Update AFS... |
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo"
test_that("getTranscriptIdsWithParticipant works", {
skip_on_cran() # don't run tests that depend on external resource on CRAN
if (!is.null(labbcatCredentials(labbcat.url, "demo", "demo"))) skip("Server not available")
ids <- getTranscriptIdsWithParti... | /tests/testthat/test-getTranscriptIdsWithParticipant.R | no_license | cran/nzilbb.labbcat | R | false | false | 866 | r | labbcat.url <- "https://labbcat.canterbury.ac.nz/demo"
test_that("getTranscriptIdsWithParticipant works", {
skip_on_cran() # don't run tests that depend on external resource on CRAN
if (!is.null(labbcatCredentials(labbcat.url, "demo", "demo"))) skip("Server not available")
ids <- getTranscriptIdsWithParti... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\docType{methods}
\name{arrangeViewports}
\alias{arrangeViewports}
\alias{arrangeViewports,list-method}
\title{Determine optimal plotting arrangement of RasterStack}
\usage{
arrangeViewports(extents, name = NULL)
\S4method{arrangeViewports}{list}(extents, name = NUL... | /SpaDES-master/man/arrangeViewports.Rd | no_license | B-Ron12/RCodeSK | R | false | false | 619 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\docType{methods}
\name{arrangeViewports}
\alias{arrangeViewports}
\alias{arrangeViewports,list-method}
\title{Determine optimal plotting arrangement of RasterStack}
\usage{
arrangeViewports(extents, name = NULL)
\S4method{arrangeViewports}{list}(extents, name = NUL... |
library(alr4)
### Name: florida
### Title: Florida presidential election
### Aliases: florida
### Keywords: datasets
### ** Examples
head(florida)
## maybe str(florida) ; plot(florida) ...
| /data/genthat_extracted_code/alr4/examples/florida.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 196 | r | library(alr4)
### Name: florida
### Title: Florida presidential election
### Aliases: florida
### Keywords: datasets
### ** Examples
head(florida)
## maybe str(florida) ; plot(florida) ...
|
plot3 <- function(){
##For transforming Dates
library(lubridate)
library(ggplot2)
library(tidyr)
library(dplyr)
##Reading data
file <- file.path(".","household_power_consumption.txt")
data <- read.table(file,header=T,na.strings=c("?","NA"),sep=";")
##Conver... | /plot3.R | no_license | abhi584/ExData_Plotting1 | R | false | false | 1,297 | r | plot3 <- function(){
##For transforming Dates
library(lubridate)
library(ggplot2)
library(tidyr)
library(dplyr)
##Reading data
file <- file.path(".","household_power_consumption.txt")
data <- read.table(file,header=T,na.strings=c("?","NA"),sep=";")
##Conver... |
# Create data for the graph.
d<- c(1,2,2,3,3,3,4,4,4,4)
# Create the histogram.
hist(d,xlab = "data",col = "yellow",border = "blue")
| /Chapter-2/Ch2-2-histogram-Chart.r | no_license | mohzary/5562-Statistical-learning | R | false | false | 135 | r | # Create data for the graph.
d<- c(1,2,2,3,3,3,4,4,4,4)
# Create the histogram.
hist(d,xlab = "data",col = "yellow",border = "blue")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbl.R
\name{print.whippr}
\alias{print.whippr}
\title{Whippr print method}
\usage{
\method{print}{whippr}(x, ...)
}
\arguments{
\item{x}{A tibble with class 'whippr'}
\item{...}{Extra arguments, not used.}
}
\description{
Whippr print method... | /man/print.whippr.Rd | permissive | fmmattioni/whippr | R | false | true | 323 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbl.R
\name{print.whippr}
\alias{print.whippr}
\title{Whippr print method}
\usage{
\method{print}{whippr}(x, ...)
}
\arguments{
\item{x}{A tibble with class 'whippr'}
\item{...}{Extra arguments, not used.}
}
\description{
Whippr print method... |
library(testthat)
context("test z.DranchukPurvisRobinson")
# test only one point at Ppr=0.5 and Tpr = 1.3
# print(z.DranchukPurvisRobinson(0.5, 1.3))
test_that("DPR matches z at Ppr=0.5 and Tpr=1.3", {
expect_equal(z.DranchukPurvisRobinson(0.5, 1.3), 0.9197157, tolerance = 1E-7)
})
test_that("DPR corr matches sol... | /tests/testthat/test_DranchukPurvisRobinson.R | no_license | sunilgarg1/zFactor | R | false | false | 2,236 | r | library(testthat)
context("test z.DranchukPurvisRobinson")
# test only one point at Ppr=0.5 and Tpr = 1.3
# print(z.DranchukPurvisRobinson(0.5, 1.3))
test_that("DPR matches z at Ppr=0.5 and Tpr=1.3", {
expect_equal(z.DranchukPurvisRobinson(0.5, 1.3), 0.9197157, tolerance = 1E-7)
})
test_that("DPR corr matches sol... |
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this di... | /base/db/R/get.trait.data.R | permissive | yan130/pecan | R | false | false | 14,037 | r | #-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this di... |
#' Title computing all within and between facet distances between quantile categories given a data
#'
#' @param .data data for which mmpd needs to be calculated
#' @param gran_x granularities mapped across x levels
#' @param gran_facet granularities mapped across facets
#' @param response univarite response variable
#'... | /R/compute_pairwise_dist.R | no_license | Sayani07/hakear | R | false | false | 2,702 | r | #' Title computing all within and between facet distances between quantile categories given a data
#'
#' @param .data data for which mmpd needs to be calculated
#' @param gran_x granularities mapped across x levels
#' @param gran_facet granularities mapped across facets
#' @param response univarite response variable
#'... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22808249671287e+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/1615782771-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.22808249671287e+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... |
testthat::context("testing influx_query")
# setup influx connection
testthat::test_that("connection", {
# only local tests
testthat::skip_on_cran()
testthat::skip_on_travis()
con <<- influx_connection(group = "admin")
testthat::expect_is(object = con, class = "list")
})
testthat::test_that("si... | /tests/testthat/test_query.R | no_license | vspinu/influxdbr | R | false | false | 3,963 | r |
testthat::context("testing influx_query")
# setup influx connection
testthat::test_that("connection", {
# only local tests
testthat::skip_on_cran()
testthat::skip_on_travis()
con <<- influx_connection(group = "admin")
testthat::expect_is(object = con, class = "list")
})
testthat::test_that("si... |
UNITEST_kmc <- function(){
x <- c( 1, 1.5, 2, 3, 4.2, 5.0, 6.1, 5.3, 4.5, 0.9, 2.1, 4.3) # positive time
d <- c( 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1) # status censored/uncensored
#### compute e-value and its adjustment ####
g=list( f=function(x) { x-3.7} )
result = kmc.solve( x,d,g)
retu... | /tests/testthat/test-kmc.R | no_license | yfyang86/kmc | R | false | false | 870 | r | UNITEST_kmc <- function(){
x <- c( 1, 1.5, 2, 3, 4.2, 5.0, 6.1, 5.3, 4.5, 0.9, 2.1, 4.3) # positive time
d <- c( 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1) # status censored/uncensored
#### compute e-value and its adjustment ####
g=list( f=function(x) { x-3.7} )
result = kmc.solve( x,d,g)
retu... |
#' @title Compute specificity
#' @description Calculates specificity of tools
#' @details Compares tool adjacency matrix output to Klemm-Eguiluz adjacency matrices
#'
#' @param imatrix true positive matrix, e.g. Klemm-Eguiluz adjacency matrix
#' @param outmatrix matrix with values, e.g. Spearman correlation or other to... | /R/computeSpecificity.R | no_license | ramellose/NetworkUtils | R | false | false | 1,014 | r | #' @title Compute specificity
#' @description Calculates specificity of tools
#' @details Compares tool adjacency matrix output to Klemm-Eguiluz adjacency matrices
#'
#' @param imatrix true positive matrix, e.g. Klemm-Eguiluz adjacency matrix
#' @param outmatrix matrix with values, e.g. Spearman correlation or other to... |
library(pROC)
data(aSAH)
context("roc.test")
test_that("roc.test works", {
t1 <<- roc.test(r.wfns, r.s100b)
t2 <<- roc.test(r.wfns, r.ndka)
t3 <<- roc.test(r.ndka, r.s100b)
expect_is(t1, "htest")
expect_is(t2, "htest")
expect_is(t3, "htest")
})
test_that("roc.test statistic and p are as expected with defaults... | /tests/testthat/test-roc.test.R | no_license | Mwebaza/pROC | R | false | false | 7,333 | r | library(pROC)
data(aSAH)
context("roc.test")
test_that("roc.test works", {
t1 <<- roc.test(r.wfns, r.s100b)
t2 <<- roc.test(r.wfns, r.ndka)
t3 <<- roc.test(r.ndka, r.s100b)
expect_is(t1, "htest")
expect_is(t2, "htest")
expect_is(t3, "htest")
})
test_that("roc.test statistic and p are as expected with defaults... |
#' @title t-tests
#' @description t-tests
#' @param x matrix or character vector with matrix column names
#' @param y matrix to compare against or matrix with x and y column names
#' @param ... adjust.method and cutoff
#' @return t-tests
#' @rdname ttest
#' @export
ttest = function(x, y, ...) {
stopifnot(has_dim... | /R/ttest.R | permissive | jlaffy/jtools | R | false | false | 1,103 | r |
#' @title t-tests
#' @description t-tests
#' @param x matrix or character vector with matrix column names
#' @param y matrix to compare against or matrix with x and y column names
#' @param ... adjust.method and cutoff
#' @return t-tests
#' @rdname ttest
#' @export
ttest = function(x, y, ...) {
stopifnot(has_dim... |
# Define UI for application that plots features of movies
dashboardPage(
skin = 'black',
dashboardHeader(title = "Play with music"),
dashboardSidebar(
sidebarMenu(
menuItem("Content", tabName = "home", icon = icon("dashboard")),
menuItem("Sentiment", icon = icon("meh-o"), tabName = "sentime... | /Application/ui.R | no_license | StanislawSmyl/drill_in_music | R | false | false | 13,526 | r | # Define UI for application that plots features of movies
dashboardPage(
skin = 'black',
dashboardHeader(title = "Play with music"),
dashboardSidebar(
sidebarMenu(
menuItem("Content", tabName = "home", icon = icon("dashboard")),
menuItem("Sentiment", icon = icon("meh-o"), tabName = "sentime... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Get_x_text_angle.R
\name{get_x_text_angle}
\alias{get_x_text_angle}
\title{Check the level of column and return the proper angle of X_text_axis}
\usage{
get_x_text_angle(levels)
}
\arguments{
\item{levels}{the level number of a column}
}
\val... | /man/get_x_text_angle.Rd | permissive | MohsenYN/AllInOne | R | false | true | 443 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Get_x_text_angle.R
\name{get_x_text_angle}
\alias{get_x_text_angle}
\title{Check the level of column and return the proper angle of X_text_axis}
\usage{
get_x_text_angle(levels)
}
\arguments{
\item{levels}{the level number of a column}
}
\val... |
# Solution for Lesson_3_Exercises_Using_R
# mileage.csv is derived from a 1991 U.S EPA study of passenger car mileage.
# This file includes on sixty cars: HP (engine horsepower),
# MPG (average miles per gallon) WT (vehicle weight in 100 lb units)
# and CLASS (vehicle weight class C1,...,C6).
# read the comma-delim... | /401_Lesson_03_Solution.r | no_license | jmichaelgilbert/mspaScripts | R | false | false | 3,995 | r | # Solution for Lesson_3_Exercises_Using_R
# mileage.csv is derived from a 1991 U.S EPA study of passenger car mileage.
# This file includes on sixty cars: HP (engine horsepower),
# MPG (average miles per gallon) WT (vehicle weight in 100 lb units)
# and CLASS (vehicle weight class C1,...,C6).
# read the comma-delim... |
# Generate n-dimensional response Y that follows linear regression model Y = Xbeta + epsilon, where epsilon is normal zero with variance sigma^2 independent across samples. Seed should be set at the beginning of the function
# X - design matrix
# beta - given parameter vector
# sigma - standard deviation of the noise
#... | /FunctionsLM.R | no_license | tamu-stat689-statcomputing-fall2019/hw1-course-setup-emanuel996 | R | false | false | 1,263 | r | # Generate n-dimensional response Y that follows linear regression model Y = Xbeta + epsilon, where epsilon is normal zero with variance sigma^2 independent across samples. Seed should be set at the beginning of the function
# X - design matrix
# beta - given parameter vector
# sigma - standard deviation of the noise
#... |
#' Get HS Metrics
#'
#' @param reports data frame with reports
#' @param src string with name of column name to use (from reports)
#' @return A data table with hs metrics
#' @examples
#' #dat <- getHSMetrics(reports, src="PANEL_TUMOR_HSMETRICS")
#' #dat <- getHSMetrics(reports, src="PANEL_NORMAL_HSMETRICS")
#' #dat <-... | /R/getHSMetrics.R | permissive | dakl/clinseqr | R | false | false | 2,050 | r | #' Get HS Metrics
#'
#' @param reports data frame with reports
#' @param src string with name of column name to use (from reports)
#' @return A data table with hs metrics
#' @examples
#' #dat <- getHSMetrics(reports, src="PANEL_TUMOR_HSMETRICS")
#' #dat <- getHSMetrics(reports, src="PANEL_NORMAL_HSMETRICS")
#' #dat <-... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
library(shiny)
library(rpart)
library(rpart.plot)
shinyServer(function(input,output){
output$plot_out=renderPlot({
DB = mtcars
var="mpg ~ "
var.include=input$variable
... | /server.R | no_license | AndreaMod/GITHUB-DDP | R | false | false | 490 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
library(shiny)
library(rpart)
library(rpart.plot)
shinyServer(function(input,output){
output$plot_out=renderPlot({
DB = mtcars
var="mpg ~ "
var.include=input$variable
... |
##* ****************************************************************
## Programmer[s]: Leandro Fernandes
## Company/Institution: Cargill
## email: leandro_h_fernandes@cargill.com
## Date: June 20, 2016
##
## The author believes that share code and knowledge is awesome.
## Feel free to share and modify this piec... | /utils/report.R | no_license | leandroohf/raop | R | false | false | 1,687 | r | ##* ****************************************************************
## Programmer[s]: Leandro Fernandes
## Company/Institution: Cargill
## email: leandro_h_fernandes@cargill.com
## Date: June 20, 2016
##
## The author believes that share code and knowledge is awesome.
## Feel free to share and modify this piec... |
testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... | /epiphy/inst/testfiles/costTotCPP/AFL_costTotCPP/costTotCPP_valgrind_files/1615926823-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 1,101 | r | testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.