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 |
|---|---|---|---|---|---|---|---|---|---|
#USEAGE: convert(c("9321","9322","9330"), type = 'EGP')
#ISCO: int or char -> int
#fromFormate: ISCO88. Can be other formats but will return first match rather than best match
#to Format: can be EGP, SIOPS, ISEI. Will add ABS criteria soon
#translator is a data frame consiting of conversion table
#
# Some useful keyboa... | /R/convert.R | permissive | conig/isco88conversion | R | false | false | 2,488 | r | #USEAGE: convert(c("9321","9322","9330"), type = 'EGP')
#ISCO: int or char -> int
#fromFormate: ISCO88. Can be other formats but will return first match rather than best match
#to Format: can be EGP, SIOPS, ISEI. Will add ABS criteria soon
#translator is a data frame consiting of conversion table
#
# Some useful keyboa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graph-iplot.R
\name{graph-iplot}
\alias{graph-iplot}
\alias{iplot}
\alias{iplot.graphNEL}
\title{Function for plotting graphs using the 'igraph' package.}
\usage{
iplot(x, ...)
\method{iplot}{graphNEL}(x, ...)
}
\arguments{
\item{x}{A graph ... | /man/graph-iplot.Rd | no_license | cran/gRbase | R | false | true | 623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graph-iplot.R
\name{graph-iplot}
\alias{graph-iplot}
\alias{iplot}
\alias{iplot.graphNEL}
\title{Function for plotting graphs using the 'igraph' package.}
\usage{
iplot(x, ...)
\method{iplot}{graphNEL}(x, ...)
}
\arguments{
\item{x}{A graph ... |
# --------------------------------------
# 11-aim1-sens-enteroQPCR-continuous-regs-body.R
# ben arnold (benarnold@berkeley.edu)
#
# description:
# estimate the association between water
# quality indicator concentrations and
# the risk of Diarrhea among swimmers
# for the 13 beaches study
#
# Analyses are conducted... | /src/aim1/15-aim1-sens-enteroQPCR-continuous-regs-body.R | no_license | ben-arnold/13beaches | R | false | false | 8,742 | r |
# --------------------------------------
# 11-aim1-sens-enteroQPCR-continuous-regs-body.R
# ben arnold (benarnold@berkeley.edu)
#
# description:
# estimate the association between water
# quality indicator concentrations and
# the risk of Diarrhea among swimmers
# for the 13 beaches study
#
# Analyses are conducted... |
##Missing Values are denoted by NA or NaN for undefined mathematical operations
##is.na() is used to test objects they are NA
x <- c(1 , 2, NA, 10, 3)
x
is.na(x)
##[1] FALSE FALSE TRUE FALSE FALSE
is.nan(x)
##[1] FALSE FALSE FALSE FALSE FALSE
x <- c(1 , 2, "test", 10, 3)
x
##[1] "1" "2" "test" "10" ... | /notes/MissingValues.R | no_license | MattPaul25/R_Programming | R | false | false | 630 | r | ##Missing Values are denoted by NA or NaN for undefined mathematical operations
##is.na() is used to test objects they are NA
x <- c(1 , 2, NA, 10, 3)
x
is.na(x)
##[1] FALSE FALSE TRUE FALSE FALSE
is.nan(x)
##[1] FALSE FALSE FALSE FALSE FALSE
x <- c(1 , 2, "test", 10, 3)
x
##[1] "1" "2" "test" "10" ... |
##
## S3 method to sumarize 'SK' object
##
summary.SK.nest <- function(object, ...)
{
if(!inherits(object,
'SK.nest'))
stop("Use only with \"SK.nest\" objects!")
ngroups <- object$groups[length(object$groups)]
if(ngroups > 26)
groupletter <- as.vector(t(outer(letters,
... | /R/summary.SK.nest.R | no_license | klainfo/ScottKnott | R | false | false | 2,033 | r | ##
## S3 method to sumarize 'SK' object
##
summary.SK.nest <- function(object, ...)
{
if(!inherits(object,
'SK.nest'))
stop("Use only with \"SK.nest\" objects!")
ngroups <- object$groups[length(object$groups)]
if(ngroups > 26)
groupletter <- as.vector(t(outer(letters,
... |
library(rex)
library(reshape2)
#Download
path <- 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip'
download.file(path, 'f.zip'); unzip('f.zip')
#Appropriately labels the data set with descriptive variable names.
cnames <- as.character(read.csv('UCI HAR Dataset/features.txt',
... | /run_analysis.R | no_license | RakaCat/human_activity_coursera_wk4 | R | false | false | 2,327 | r | library(rex)
library(reshape2)
#Download
path <- 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip'
download.file(path, 'f.zip'); unzip('f.zip')
#Appropriately labels the data set with descriptive variable names.
cnames <- as.character(read.csv('UCI HAR Dataset/features.txt',
... |
library('e1071')
#' Classify the given SpatialPointsDataFrame
#' @param proj.df SpatialPointsDataFrame, the points to classify
#' @param useX boolean, use axe X for the classification
#' @param lessType integer, 0 : no merge, 1 : merge similar types, 2 : merge "wood / not wood"
#' @param rePredict boolean, the k... | /R/classification.r | no_license | VSasyan/MagneticDB | R | false | false | 2,347 | r | library('e1071')
#' Classify the given SpatialPointsDataFrame
#' @param proj.df SpatialPointsDataFrame, the points to classify
#' @param useX boolean, use axe X for the classification
#' @param lessType integer, 0 : no merge, 1 : merge similar types, 2 : merge "wood / not wood"
#' @param rePredict boolean, the k... |
df <- data.frame(x = 1:10, y = 1:10)
base <- ggplot(df, aes(x, y)) +
geom_blank() +
theme_bw()
p <-
base + annotation_custom(
grob = grid::roundrectGrob(),
xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf
)
| /ggplot2/Layers/Annotations/annotation_custom/example1.R | no_license | plotly/ssim_baselines | R | false | false | 220 | r | df <- data.frame(x = 1:10, y = 1:10)
base <- ggplot(df, aes(x, y)) +
geom_blank() +
theme_bw()
p <-
base + annotation_custom(
grob = grid::roundrectGrob(),
xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf
)
|
###############################JENNY MUNOZ#####################################
###############################################################################
## Proyect Foraging ecology of residents and migrants
## R-code for manuscript Generalized linear models
## Jenny Munoz
#### last update: February 20 2017
#####... | /JFO_Munoz&Colorado_2021/Rscript_JFO_Manuscript_ForagingMSF_Coffee_Col.R | no_license | jenmunoz/Manuscripts-data-and-Rcodes | R | false | false | 124,770 | r | ###############################JENNY MUNOZ#####################################
###############################################################################
## Proyect Foraging ecology of residents and migrants
## R-code for manuscript Generalized linear models
## Jenny Munoz
#### last update: February 20 2017
#####... |
#' @param simplified Logic `FALSE` or `TRUE`, indicating whether the function
#' should return the data set with 'original' spatial resolution or a data set
#' with 'simplified' geometry. Defaults to `TRUE`. For spatial analysis and
#' statistics users should set `simplified = FALSE`. Borders have been
#' simplifie... | /man/roxygen/templates/simplified.R | no_license | cran/geobr | R | false | false | 431 | r | #' @param simplified Logic `FALSE` or `TRUE`, indicating whether the function
#' should return the data set with 'original' spatial resolution or a data set
#' with 'simplified' geometry. Defaults to `TRUE`. For spatial analysis and
#' statistics users should set `simplified = FALSE`. Borders have been
#' simplifie... |
downloadURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
downloadFile <- "./Data/household_power_consumption.zip"
householdFile <- "./Data/household_power_consumption.txt"
if (!file.exists(householdFile)) {
download.file(downloadURL, downloadFile, method = "curl"... | /Plot3.R | no_license | jeevasiva/Exploratory-Data-Analysis | R | false | false | 1,245 | r | downloadURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
downloadFile <- "./Data/household_power_consumption.zip"
householdFile <- "./Data/household_power_consumption.txt"
if (!file.exists(householdFile)) {
download.file(downloadURL, downloadFile, method = "curl"... |
library(phyloseq)
import_map <- function(x, ...) {
tmp <- read.delim(x, comment.char="")
rownames(tmp) <- tmp[,1]
tmp
}
files <- list.files('BIOM', pattern="*.biom$", recursive=TRUE, full.names=TRUE)
biomid <- basename(dirname(files))
mapfiles <- sapply(paste0("^", biomid , "_"), list.files, path='mapping_fil... | /public/qiita/Flores/process_biom.R | no_license | zdk123/SpiecEasiSLR_manuscript | R | false | false | 738 | r | library(phyloseq)
import_map <- function(x, ...) {
tmp <- read.delim(x, comment.char="")
rownames(tmp) <- tmp[,1]
tmp
}
files <- list.files('BIOM', pattern="*.biom$", recursive=TRUE, full.names=TRUE)
biomid <- basename(dirname(files))
mapfiles <- sapply(paste0("^", biomid , "_"), list.files, path='mapping_fil... |
proj3DTo2D <- function(m, eyez = 300, zoom = 280, maxzoom = -200){
if(is.vector(m)) m <- matrix(m, nrow=1, ncol=length(m))
if(length(dim(m)) == 3){
rm <- array(NA, dim=c(dim(m)[1], 2, dim(m)[3]), dimnames=list(dimnames(m)[[1]], NULL, dimnames(m)[[3]]))
for(i in 1:dim(m)[3]) rm[, , i] <- proj3DTo2D(m[, , i])
... | /R/proj3DTo2D.R | no_license | aaronolsen/linkR | R | false | false | 586 | r | proj3DTo2D <- function(m, eyez = 300, zoom = 280, maxzoom = -200){
if(is.vector(m)) m <- matrix(m, nrow=1, ncol=length(m))
if(length(dim(m)) == 3){
rm <- array(NA, dim=c(dim(m)[1], 2, dim(m)[3]), dimnames=list(dimnames(m)[[1]], NULL, dimnames(m)[[3]]))
for(i in 1:dim(m)[3]) rm[, , i] <- proj3DTo2D(m[, , i])
... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/HedgeTicker.R
\name{HedgeTicker}
\alias{HedgeTicker}
\title{Hedge Portfolio}
\usage{
HedgeTicker(ticker, numshares = 100, components = "^GSPC", cutoff = 0.05,
start = Sys.Date() - 365, end = Sys.Date())
}
\arguments{
\item{ticker}{Y... | /man/HedgeTicker.Rd | no_license | Texas-UCF/quantkit | R | false | false | 803 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/HedgeTicker.R
\name{HedgeTicker}
\alias{HedgeTicker}
\title{Hedge Portfolio}
\usage{
HedgeTicker(ticker, numshares = 100, components = "^GSPC", cutoff = 0.05,
start = Sys.Date() - 365, end = Sys.Date())
}
\arguments{
\item{ticker}{Y... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{coxph_tidiers}
\alias{augment.coxph}
\alias{coxph_tidiers}
\alias{glance.coxph}
\alias{tidy.coxph}
\title{Tidiers for coxph object}
\usage{
\method{tidy}{coxph}(x, exponentiate = FALSE, conf.int = 0.95, ...)
\method{augment}{coxph}(x, data = model.frame(x), ne... | /man/coxph_tidiers.Rd | no_license | kismsu/broom | R | false | false | 2,578 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{coxph_tidiers}
\alias{augment.coxph}
\alias{coxph_tidiers}
\alias{glance.coxph}
\alias{tidy.coxph}
\title{Tidiers for coxph object}
\usage{
\method{tidy}{coxph}(x, exponentiate = FALSE, conf.int = 0.95, ...)
\method{augment}{coxph}(x, data = model.frame(x), ne... |
library(ape)
testtree <- read.tree("9872_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9872_0_unrooted.txt") | /codeml_files/newick_trees_processed/9872_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("9872_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9872_0_unrooted.txt") |
#' Perform a hard arrange
#' @description
#' A hard_arrange is a sort by that also reorganizes the chunks to ensure that
#' every unique grouping of `by`` is in the same chunk. Or in other words, every
#' row that share the same `by` value will end up in the same chunk.
#' @param df a disk.frame
#' @param ... gro... | /fuzzedpackages/disk.frame/R/hard_arrange.r | no_license | akhikolla/testpackages | R | false | false | 2,505 | r | #' Perform a hard arrange
#' @description
#' A hard_arrange is a sort by that also reorganizes the chunks to ensure that
#' every unique grouping of `by`` is in the same chunk. Or in other words, every
#' row that share the same `by` value will end up in the same chunk.
#' @param df a disk.frame
#' @param ... gro... |
#!/usr/bin/Rscript
space <- read.delim("input/mut_candidates/SPACE.tsv")
rownames(space) <- space[,1]
hi1 <- read.delim("input/mut_candidates/CCSB_HI1_updated.tsv")
hi2 <- read.delim("input/mut_candidates/HI2.tsv")
hi2012 <- read.delim("input/mut_candidates/HI2012.tsv")[,c(1,3)]
inSpace1 <- function(interactions) {
... | /lore-edgotype/src/main/resources/queries/hi_space.R | no_license | jweile/lore | R | false | false | 1,496 | r | #!/usr/bin/Rscript
space <- read.delim("input/mut_candidates/SPACE.tsv")
rownames(space) <- space[,1]
hi1 <- read.delim("input/mut_candidates/CCSB_HI1_updated.tsv")
hi2 <- read.delim("input/mut_candidates/HI2.tsv")
hi2012 <- read.delim("input/mut_candidates/HI2012.tsv")[,c(1,3)]
inSpace1 <- function(interactions) {
... |
#' @title The regulondb class
#' @description The regulondb class is an extension of the SQLiteConnection,
#' which as the name suggests, consists of an SQLite connection to a database
#' with the table design of the
#' RegulonDb database. In addition to the slots defined in the
#' SQLiteConnection object,
#' the regul... | /R/regulondb-classes.R | no_license | ComunidadBioInfo/regutools | R | false | false | 4,953 | r | #' @title The regulondb class
#' @description The regulondb class is an extension of the SQLiteConnection,
#' which as the name suggests, consists of an SQLite connection to a database
#' with the table design of the
#' RegulonDb database. In addition to the slots defined in the
#' SQLiteConnection object,
#' the regul... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jlim.R
\docType{class}
\name{jlim-class}
\alias{jlim-class}
\title{jlim class to contain the processed input data and results of JLIM test}
\description{
jlim class to contain the processed input data and results of JLIM test
}
\section{Slots... | /jlimR/man/jlim-class.Rd | no_license | xtmgah/jlim | R | false | true | 778 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jlim.R
\docType{class}
\name{jlim-class}
\alias{jlim-class}
\title{jlim class to contain the processed input data and results of JLIM test}
\description{
jlim class to contain the processed input data and results of JLIM test
}
\section{Slots... |
#Simluation program
#Inventory system with a (s,S) ordering policy
#Right now, assuming S = 100. Little s is variable
#Outer initializations
all_means <- c() #Empty data frame to store average cost
all_var <- c() #Empty vector to store variances of each (outer) loop
min_little_s = 10 ... | /ams 553 final proj sim.R | no_license | vbigmouse/InventorySystemSimulation | R | false | false | 8,408 | r | #Simluation program
#Inventory system with a (s,S) ordering policy
#Right now, assuming S = 100. Little s is variable
#Outer initializations
all_means <- c() #Empty data frame to store average cost
all_var <- c() #Empty vector to store variances of each (outer) loop
min_little_s = 10 ... |
## This library provides a simple way to cache the inverse of a matrix to avoid recalculating it
## For example:
## m <- makeCacheMatrix(matrix(rnorm(9), nrow=3, ncol=3))
## s0 <- cacheSolve(m)
## s1 <- cacheSolve(m)
## s0 == s1
## [,1] [,2] [,3]
## [1,] TRUE TRUE TRUE
## [2,] TRUE TRUE TRUE
## ... | /cachematrix.R | no_license | ldunning/ProgrammingAssignment2 | R | false | false | 1,407 | r | ## This library provides a simple way to cache the inverse of a matrix to avoid recalculating it
## For example:
## m <- makeCacheMatrix(matrix(rnorm(9), nrow=3, ncol=3))
## s0 <- cacheSolve(m)
## s1 <- cacheSolve(m)
## s0 == s1
## [,1] [,2] [,3]
## [1,] TRUE TRUE TRUE
## [2,] TRUE TRUE TRUE
## ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse_less.R
\name{parse_less}
\alias{parse_less}
\title{Parse LESS content to CSS}
\usage{
parse_less(code)
}
\arguments{
\item{code}{text to be converted in LESS format}
}
\value{
converted text to CSS
}
\description{
Parse LESS file to CSS... | /man/parse_less.Rd | permissive | ciirc-kso/rless | R | false | true | 525 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse_less.R
\name{parse_less}
\alias{parse_less}
\title{Parse LESS content to CSS}
\usage{
parse_less(code)
}
\arguments{
\item{code}{text to be converted in LESS format}
}
\value{
converted text to CSS
}
\description{
Parse LESS file to CSS... |
context('addAutoFilter')
test_that('works in simple example', {
## issue #47
hours <- seq(as.POSIXct("2011-01-01 01:00:00", tz="GMT"),
as.POSIXct("2011-01-01 10:00:00", tz="GMT"), by="1 hour")
data <- data.frame(x=1:10, type=rep(c("A", "B"), 5), datetime=hours)
wb <- createWorkbook(type="x... | /tests/testthat/test-addAutoFilter.R | no_license | colearendt/xlsx | R | false | false | 597 | r | context('addAutoFilter')
test_that('works in simple example', {
## issue #47
hours <- seq(as.POSIXct("2011-01-01 01:00:00", tz="GMT"),
as.POSIXct("2011-01-01 10:00:00", tz="GMT"), by="1 hour")
data <- data.frame(x=1:10, type=rep(c("A", "B"), 5), datetime=hours)
wb <- createWorkbook(type="x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fu_ASM-CDB_aux_vR65_1.R
\name{predict.hist.x}
\alias{predict.hist.x}
\title{Titulo}
\usage{
\method{predict}{hist.x}(hh, x1)
}
\description{
(parrafo1: va debajo del titulo, que hace en 1 oracion)
}
\details{
(parrafos2-: van en D... | /man/predict.hist.x.Rd | no_license | dalessandrini/uefi2 | R | false | true | 366 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fu_ASM-CDB_aux_vR65_1.R
\name{predict.hist.x}
\alias{predict.hist.x}
\title{Titulo}
\usage{
\method{predict}{hist.x}(hh, x1)
}
\description{
(parrafo1: va debajo del titulo, que hace en 1 oracion)
}
\details{
(parrafos2-: van en D... |
ga_internal_names <- c('Iter','Size','Similarity','Similarity_M','Resample')
ga_external_names <- c('Iter','Resample')
check_ga_pop <- function(x) {
no_vars <- apply(x, 1, sum) == 0
if(any(no_vars)) {
for(i in which(no_vars)) {
here <- sample(1:ncol(x), 1)
x[i,here] <- 1
}
}
x
}
ga_func_c... | /B_analysts_sources_github/topepo/caret/gafs.R | no_license | Irbis3/crantasticScrapper | R | false | false | 52,583 | r |
ga_internal_names <- c('Iter','Size','Similarity','Similarity_M','Resample')
ga_external_names <- c('Iter','Resample')
check_ga_pop <- function(x) {
no_vars <- apply(x, 1, sum) == 0
if(any(no_vars)) {
for(i in which(no_vars)) {
here <- sample(1:ncol(x), 1)
x[i,here] <- 1
}
}
x
}
ga_func_c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doc-params.R
\name{dplyr_tidy_select}
\alias{dplyr_tidy_select}
\title{Argument type: tidy-select}
\description{
This page the describes the \verb{<tidy-select>} argument modifier which indicates
the argument supports \strong{tidy selections}... | /man/dplyr_tidy_select.Rd | permissive | apreshill/dplyr | R | false | true | 3,023 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doc-params.R
\name{dplyr_tidy_select}
\alias{dplyr_tidy_select}
\title{Argument type: tidy-select}
\description{
This page the describes the \verb{<tidy-select>} argument modifier which indicates
the argument supports \strong{tidy selections}... |
start_time <- Sys.time() # for timing the script
if(!exists("region")) region <- "cambridgeshire" # create LA name if none exists, then set-up data repo
if(!file.exists(pct_data)) stop(paste("The pct-data repository cannot be found. Please clone https://github.com/npct/pct-data in", dirname(getwd())))
if(!file.exis... | /north-east/build_region.R | no_license | Robinlovelace/pct-data | R | false | false | 6,790 | r | start_time <- Sys.time() # for timing the script
if(!exists("region")) region <- "cambridgeshire" # create LA name if none exists, then set-up data repo
if(!file.exists(pct_data)) stop(paste("The pct-data repository cannot be found. Please clone https://github.com/npct/pct-data in", dirname(getwd())))
if(!file.exis... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/round_sensibly.r
\name{round_sensibly}
\alias{round_sensibly}
\title{Round Numbers to an "Appropriate" Number of Digits}
\usage{
round_sensibly(.x, .digits = 0, .separation = TRUE)
}
\arguments{
\item{.x}{Numeric vector. Values to be rounded.... | /man/round_sensibly.Rd | no_license | STAT-UP/statupinternal | R | false | true | 1,872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/round_sensibly.r
\name{round_sensibly}
\alias{round_sensibly}
\title{Round Numbers to an "Appropriate" Number of Digits}
\usage{
round_sensibly(.x, .digits = 0, .separation = TRUE)
}
\arguments{
\item{.x}{Numeric vector. Values to be rounded.... |
#' @title get_janes_xml
#' @description Pulls Janes data as a xml file for all endpoints.
#'
#' @param country Country filter for news
#' @param branch Military branch
#' @param type Depends on endpoint
#' @param endpoint One of either "news" or "references"
#' @param query Search term
#' @param environment Of search, ... | /R/get_janes_xml.R | no_license | cgpeltier/janes | R | false | false | 4,641 | r | #' @title get_janes_xml
#' @description Pulls Janes data as a xml file for all endpoints.
#'
#' @param country Country filter for news
#' @param branch Military branch
#' @param type Depends on endpoint
#' @param endpoint One of either "news" or "references"
#' @param query Search term
#' @param environment Of search, ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/CheckData.R
\name{checkdata02}
\alias{checkdata02}
\title{Check data for a MET in a RCBD}
\usage{
checkdata02(trait, geno, env, data)
}
\arguments{
\item{trait}{The trait to analyze}
\item{geno}{The genotypes}
\item{env}{The environ... | /man/checkdata02.Rd | no_license | sofilibi/st4gi | R | false | false | 745 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/CheckData.R
\name{checkdata02}
\alias{checkdata02}
\title{Check data for a MET in a RCBD}
\usage{
checkdata02(trait, geno, env, data)
}
\arguments{
\item{trait}{The trait to analyze}
\item{geno}{The genotypes}
\item{env}{The environ... |
/REG_data_2019.R | no_license | azizasall/FINAL_DATA_ESSAI | R | false | false | 31,300 | r | ||
trainset = matrix(,length(filenames),(16*4 + 120 *4+2))
trainset = as.data.frame(trainset)
length =length(filenames)
colnames(trainset) = c("id","target",paste("mean_",rep(1:16),sep=""),paste("median_",rep(1:16),sep=""),paste("sem_",rep(1:16),sep=""),paste("abssum_",rep(1:16),sep=""),paste("cor_",rep(1:120),sep=""),... | /correlations between channels.R | permissive | ur4me/Melbourne-University-AES-MathWorks-NIH-Seizure-Prediction | R | false | false | 1,905 | r | trainset = matrix(,length(filenames),(16*4 + 120 *4+2))
trainset = as.data.frame(trainset)
length =length(filenames)
colnames(trainset) = c("id","target",paste("mean_",rep(1:16),sep=""),paste("median_",rep(1:16),sep=""),paste("sem_",rep(1:16),sep=""),paste("abssum_",rep(1:16),sep=""),paste("cor_",rep(1:120),sep=""),... |
init <- Csnippet("
int N_MEMBERS = n_members;
int i,j;
int z;
double *I_vec = &I_m1; // initial infection status
double *h_vec = &h_m1; // initial titer
double *h_last_infection_vec = &h_last_infection_m1; // initial ... | /Models/Single_strain_model/Simulations/Utility_scripts/rprocess_hh.R | no_license | yangepi/Influenza-immune-dynamics | R | false | false | 22,400 | r | init <- Csnippet("
int N_MEMBERS = n_members;
int i,j;
int z;
double *I_vec = &I_m1; // initial infection status
double *h_vec = &h_m1; // initial titer
double *h_last_infection_vec = &h_last_infection_m1; // initial ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rhandsontable.R
\name{hot_validate_character}
\alias{hot_validate_character}
\title{Handsontable widget}
\usage{
hot_validate_character(hot, cols, choices, allowInvalid = FALSE)
}
\arguments{
\item{hot}{rhandsontable object}
\item... | /man/hot_validate_character.Rd | permissive | cran/rhandsontable | R | false | true | 1,056 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rhandsontable.R
\name{hot_validate_character}
\alias{hot_validate_character}
\title{Handsontable widget}
\usage{
hot_validate_character(hot, cols, choices, allowInvalid = FALSE)
}
\arguments{
\item{hot}{rhandsontable object}
\item... |
#####################
# DATA MANIPULATION #
#####################
#the following file holds hourly data on solar power national generation and solar power capacity in MWh
#from date 01/01/2015 till 09/01/2019
solar.de <- read.csv("german_solar_capacity_actual_01012015-09012019.csv")
generation.de <-ts(solar.d... | /exam_code.R | no_license | ArnPiano/solar_de | R | false | false | 7,763 | r | #####################
# DATA MANIPULATION #
#####################
#the following file holds hourly data on solar power national generation and solar power capacity in MWh
#from date 01/01/2015 till 09/01/2019
solar.de <- read.csv("german_solar_capacity_actual_01012015-09012019.csv")
generation.de <-ts(solar.d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/panorama_operations.R
\name{panorama_list_devices_jobs}
\alias{panorama_list_devices_jobs}
\title{Returns a list of jobs}
\usage{
panorama_list_devices_jobs(
DeviceId = NULL,
MaxResults = NULL,
NextToken = NULL
)
}
\arguments{
\item{Dev... | /cran/paws.machine.learning/man/panorama_list_devices_jobs.Rd | permissive | paws-r/paws | R | false | true | 728 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/panorama_operations.R
\name{panorama_list_devices_jobs}
\alias{panorama_list_devices_jobs}
\title{Returns a list of jobs}
\usage{
panorama_list_devices_jobs(
DeviceId = NULL,
MaxResults = NULL,
NextToken = NULL
)
}
\arguments{
\item{Dev... |
/ReservaMatematica.R | no_license | CrisCorrea/SimulacaoEstocastica | R | false | false | 919 | r | ||
#' Create a new data frame from a Fantasy Lab MLB player model data frame.
#'
#' Receives 10 player names to create a data frame with for further analysis.
#'
#' @param n1 Name of a player from a player model data frame
#' @param n2 Name of second player
#' @param n3 Name of third player
#' @param n4 Name of fourth... | /R/extract10FromModel.R | no_license | ericcolon/Daily-Fantasy | R | false | false | 1,849 | r |
#' Create a new data frame from a Fantasy Lab MLB player model data frame.
#'
#' Receives 10 player names to create a data frame with for further analysis.
#'
#' @param n1 Name of a player from a player model data frame
#' @param n2 Name of second player
#' @param n3 Name of third player
#' @param n4 Name of fourth... |
#####################
#Doc set up
#####################
setwd('~/Desktop/CSHL/')
load("most_prev_seq_by_year.RData")
load('AA_GEN.RData')
load('UNIQUE_DNA.RData')
library(lubridate)
#####################
#Set up names of amino acids
#####################
{{f <- c('ttt', 'ttc', rep(NA, 4))
l <- c('tta', 'ttg', 'ctt', '... | /synonymous_neighbor_analysis/stat_synon.R | no_license | mwalte10/influenza | R | false | false | 7,817 | r | #####################
#Doc set up
#####################
setwd('~/Desktop/CSHL/')
load("most_prev_seq_by_year.RData")
load('AA_GEN.RData')
load('UNIQUE_DNA.RData')
library(lubridate)
#####################
#Set up names of amino acids
#####################
{{f <- c('ttt', 'ttc', rep(NA, 4))
l <- c('tta', 'ttg', 'ctt', '... |
"%>%" <- magrittr::"%>%"
# BASE DE DADOS DA WHO DE INATIVIDADE FÍSICA------------------------------------
# Lendo a base de dados
base_dados_bruta <-
readr::read_csv("data-raw/NCD_PAA.csv",
col_names = TRUE,
skip = 1
) %>%
dplyr::glimpse()
# Arrumando a base... | /Scripts/Arrumando_a_base_Inativ.R | no_license | saulosgil/tcc_r4ds2 | R | false | false | 1,726 | r | "%>%" <- magrittr::"%>%"
# BASE DE DADOS DA WHO DE INATIVIDADE FÍSICA------------------------------------
# Lendo a base de dados
base_dados_bruta <-
readr::read_csv("data-raw/NCD_PAA.csv",
col_names = TRUE,
skip = 1
) %>%
dplyr::glimpse()
# Arrumando a base... |
estrutura = function(data, col.especies, col.dap, col.parcelas, area.parcela, est.vertical = NA, est.interno = NA, nao.identificada = "NI"){
SPECIES = col.especies
DBH = col.dap
PLOTS = col.parcelas
# alterei aqui para areaplot poder ser uma coluna do data frame
if(is.numeric(area.parcela) ){AREA.PL... | /estrutura.R | no_license | sollano/nativas | R | false | false | 5,850 | r | estrutura = function(data, col.especies, col.dap, col.parcelas, area.parcela, est.vertical = NA, est.interno = NA, nao.identificada = "NI"){
SPECIES = col.especies
DBH = col.dap
PLOTS = col.parcelas
# alterei aqui para areaplot poder ser uma coluna do data frame
if(is.numeric(area.parcela) ){AREA.PL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{bcbioRNASeq-class}
\alias{bcbioRNASeq-class}
\alias{bcbioRNASeq}
\title{bcbioRNASeq Class}
\description{
S4 class containing RNA-seq counts and metadata generated by
\href{https://bcbio-nextgen.readthedocs.o... | /man/bcbioRNASeq-class.Rd | permissive | GeneticResources/bcbioRNASeq | R | false | true | 1,879 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{bcbioRNASeq-class}
\alias{bcbioRNASeq-class}
\alias{bcbioRNASeq}
\title{bcbioRNASeq Class}
\description{
S4 class containing RNA-seq counts and metadata generated by
\href{https://bcbio-nextgen.readthedocs.o... |
library(HistDAWass)
### Name: WH_hclust
### Title: Hierarchical clustering of histogram data
### Aliases: WH_hclust
### ** Examples
results=WH_hclust(x = BLOOD,simplify = TRUE, method="complete")
plot(results) # it plots the dendrogram
cutree(results,k = 5) # it returns the labels for 5 clusters
| /data/genthat_extracted_code/HistDAWass/examples/WH_hclust.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 304 | r | library(HistDAWass)
### Name: WH_hclust
### Title: Hierarchical clustering of histogram data
### Aliases: WH_hclust
### ** Examples
results=WH_hclust(x = BLOOD,simplify = TRUE, method="complete")
plot(results) # it plots the dendrogram
cutree(results,k = 5) # it returns the labels for 5 clusters
|
rm(list=ls())
source(file = "./package_load.R", chdir = T)
library(gridExtra)
library(SpatialExtremes)
#### Try to precalculate the basis functions #########
#### Hoping to save a little time in the analysis ####
load("precip_preprocess.RData")
load("cv-extcoef.RData")
nfolds <- length(cv.idx)
# openblas.set.num.threa... | /markdown/precip-rev-2/get-basis-10.R | permissive | sammorris81/extreme-decomp | R | false | false | 1,574 | r | rm(list=ls())
source(file = "./package_load.R", chdir = T)
library(gridExtra)
library(SpatialExtremes)
#### Try to precalculate the basis functions #########
#### Hoping to save a little time in the analysis ####
load("precip_preprocess.RData")
load("cv-extcoef.RData")
nfolds <- length(cv.idx)
# openblas.set.num.threa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fetch_chamber_contributions.R
\name{fetch_chamber_contributions}
\alias{fetch_chamber_contributions}
\title{Get contributions data for a defined period}
\usage{
fetch_chamber_contributions(start_date, end_date)
}
\arguments{
\item{start_date}... | /man/fetch_chamber_contributions.Rd | permissive | eliseuberoi/clparlysearch | R | false | true | 774 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fetch_chamber_contributions.R
\name{fetch_chamber_contributions}
\alias{fetch_chamber_contributions}
\title{Get contributions data for a defined period}
\usage{
fetch_chamber_contributions(start_date, end_date)
}
\arguments{
\item{start_date}... |
library(shiny)
BR<-data.frame(read.csv("data/BREdata07012014.csv"))
BR$Date<-as.Date(BR$Date, format="%m/%d/%Y %I:%M")
BR$Month2<-as.character(BR$Date, "%b")
BR$Month2<-factor(BR$Month2, levels=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
BR$NumDate <-as.numeric(BR$Date)
# Use... | /server.R | no_license | JohnYagecic/BoatRunExplorer | R | false | false | 2,343 | r | library(shiny)
BR<-data.frame(read.csv("data/BREdata07012014.csv"))
BR$Date<-as.Date(BR$Date, format="%m/%d/%Y %I:%M")
BR$Month2<-as.character(BR$Date, "%b")
BR$Month2<-factor(BR$Month2, levels=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
BR$NumDate <-as.numeric(BR$Date)
# Use... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/poisson_reg.R
\name{poisson_reg}
\alias{poisson_reg}
\alias{update.poisson_reg}
\title{Poisson regression models}
\usage{
poisson_reg(
mode = "regression",
penalty = NULL,
mixture = NULL,
engine = "glm"
)
\method{update}{poisson_reg}... | /man/poisson_reg.Rd | permissive | pdwaggoner/poissonreg | R | false | true | 2,998 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/poisson_reg.R
\name{poisson_reg}
\alias{poisson_reg}
\alias{update.poisson_reg}
\title{Poisson regression models}
\usage{
poisson_reg(
mode = "regression",
penalty = NULL,
mixture = NULL,
engine = "glm"
)
\method{update}{poisson_reg}... |
library(tidyverse)
df <- read_csv("data/winston.csv")
conf = qnorm(.975) #calculate z value at .975 mark for 2 tails at 95% CI
sd = sd(df$yards_gained) #calculate SD
level = pnorm(conf)-(1-pnorm(conf)) #calculate confidence level
# Population Standard Deviation
df %>%
summarise(lower=mean(yards_gained)-(conf*(sd... | /scripts/06_Conf_Int.R | no_license | smkilcoyne5/SPRTPS5350 | R | false | false | 1,290 | r | library(tidyverse)
df <- read_csv("data/winston.csv")
conf = qnorm(.975) #calculate z value at .975 mark for 2 tails at 95% CI
sd = sd(df$yards_gained) #calculate SD
level = pnorm(conf)-(1-pnorm(conf)) #calculate confidence level
# Population Standard Deviation
df %>%
summarise(lower=mean(yards_gained)-(conf*(sd... |
# install.packages('getopt')
library(getopt)
#' http://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script
thisFile <- function() {
cmdArgs <- commandArgs(trailingOnly = FALSE)
needle <- "--file="
match <- grep(needle, cmdArgs)
if (length(match) > 0) {
# Rscript
return(su... | /logRSMRun.R | no_license | asiapik/logrsm-experiments | R | false | false | 6,480 | r | # install.packages('getopt')
library(getopt)
#' http://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script
thisFile <- function() {
cmdArgs <- commandArgs(trailingOnly = FALSE)
needle <- "--file="
match <- grep(needle, cmdArgs)
if (length(match) > 0) {
# Rscript
return(su... |
# 0) Dropbox/R-script/monthreturn_delta5month_delta1monthcolor.r 参照。
# 1)Y軸はCLI1ヶ月変化値、X軸はCLI二次微分値、同じく月間騰落率を色と形で表す。
# 2)原点からの角度をX、月間騰落率をYに取ったグラフ。
# 3)同じく、2)原点からの角度をX、COVをYに取ったグラフ。
#
CLI <- cli_xts$usa
k1970 <- paste("1970",substr(index(last(CLI)),1,7),sep="::")
my_palette <- colorRampPalette(c("#FF0000","#FFFF00","#00FF... | /index/experiment/clidelta_radius_new.r | no_license | onomoto/R2 | R | false | false | 9,722 | r | # 0) Dropbox/R-script/monthreturn_delta5month_delta1monthcolor.r 参照。
# 1)Y軸はCLI1ヶ月変化値、X軸はCLI二次微分値、同じく月間騰落率を色と形で表す。
# 2)原点からの角度をX、月間騰落率をYに取ったグラフ。
# 3)同じく、2)原点からの角度をX、COVをYに取ったグラフ。
#
CLI <- cli_xts$usa
k1970 <- paste("1970",substr(index(last(CLI)),1,7),sep="::")
my_palette <- colorRampPalette(c("#FF0000","#FFFF00","#00FF... |
library(shiny)
source("global.R")
shinyServer(function(input, output) {
datasetInput <- reactive({
df <- data
switch(input$dataset,
"Alfa Romeo" = df$alfaromeo,
"Audi" = df$audi,
"Bentley" = df$bentley,
... | /Trendify/OtherStuff/server_test.R | no_license | Chaendryn/DDP_project | R | false | false | 4,913 | r | library(shiny)
source("global.R")
shinyServer(function(input, output) {
datasetInput <- reactive({
df <- data
switch(input$dataset,
"Alfa Romeo" = df$alfaromeo,
"Audi" = df$audi,
"Bentley" = df$bentley,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polarPlot.R
\name{polarPlot}
\alias{polarPlot}
\title{Function for plotting bivariate polar plots with smoothing.}
\usage{
polarPlot(mydata, pollutant = "nox", x = "ws", wd = "wd",
type = "default", statistic = "mean", resolution = "fine",
... | /man/polarPlot.Rd | no_license | anxorl/openair | R | false | true | 22,875 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polarPlot.R
\name{polarPlot}
\alias{polarPlot}
\title{Function for plotting bivariate polar plots with smoothing.}
\usage{
polarPlot(mydata, pollutant = "nox", x = "ws", wd = "wd",
type = "default", statistic = "mean", resolution = "fine",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ORFs_annotations.R
\name{assignAnnotations}
\alias{assignAnnotations}
\title{Overlaps GRanges object with provided annotations.}
\usage{
assignAnnotations(ORFs, con)
}
\arguments{
\item{ORFs}{- GRanges or GRangesList object of your ORFs.}
\i... | /man/assignAnnotations.Rd | permissive | Roleren/ORFik | R | false | true | 844 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ORFs_annotations.R
\name{assignAnnotations}
\alias{assignAnnotations}
\title{Overlaps GRanges object with provided annotations.}
\usage{
assignAnnotations(ORFs, con)
}
\arguments{
\item{ORFs}{- GRanges or GRangesList object of your ORFs.}
\i... |
setwd("D:/Workplace/R_Project/project/project2_naver_movie/crawling")
library(rvest)
library(dplyr)
library(stringr)
library(openxlsx)
library(abind)
### 영화 '기생충' 평점, 리뷰
trim <- function(x) gsub("^\\s+|\\s+$", "", x)
base_url <- "https://movie.naver.com"
url_sub <- "/movie/bi/mi/point.nhn?code=161967"
url <- pas... | /project/project2_naver_movie/crawling/project2.r | no_license | hsyliark/R_Project | R | false | false | 1,792 | r | setwd("D:/Workplace/R_Project/project/project2_naver_movie/crawling")
library(rvest)
library(dplyr)
library(stringr)
library(openxlsx)
library(abind)
### 영화 '기생충' 평점, 리뷰
trim <- function(x) gsub("^\\s+|\\s+$", "", x)
base_url <- "https://movie.naver.com"
url_sub <- "/movie/bi/mi/point.nhn?code=161967"
url <- pas... |
\name{saveGenome}
\alias{saveGenome}
\alias{saveGenome-methods}
\alias{saveGenome,refGenome-method}
\alias{loadGenome}
\title{Saving and loading \code{refGenome} objects}
\description{
\code{refGenome} objects contain all annotation data inside an environment.
During saving and loading, the whole content of the environ... | /man/saveGenome.Rd | no_license | cran/refGenome | R | false | false | 2,261 | rd | \name{saveGenome}
\alias{saveGenome}
\alias{saveGenome-methods}
\alias{saveGenome,refGenome-method}
\alias{loadGenome}
\title{Saving and loading \code{refGenome} objects}
\description{
\code{refGenome} objects contain all annotation data inside an environment.
During saving and loading, the whole content of the environ... |
#'
#'
#' ----------------- Additional Runit Utilities -----------------
#'
#'
#' Hadoop helper
hadoop.namenode.is.accessible <- function() {
url <- sprintf("http://%s:50070", HADOOP.NAMENODE);
internal <- url.exists(url, timeout = 5)
return(internal)
}
#' Locate a file given the pattern <bucket>/<path/to/... | /h2o-r/tests/runitUtils/utilsR.R | permissive | upeshsahu/h2o-3 | R | false | false | 33,070 | r | #'
#'
#' ----------------- Additional Runit Utilities -----------------
#'
#'
#' Hadoop helper
hadoop.namenode.is.accessible <- function() {
url <- sprintf("http://%s:50070", HADOOP.NAMENODE);
internal <- url.exists(url, timeout = 5)
return(internal)
}
#' Locate a file given the pattern <bucket>/<path/to/... |
library(readr) ## read in the csvs faster
library(dplyr)
library(openxlsx)
states <- read.csv('../generalCode/states.csv')
jobs <- read.csv('../generalCode/occupations.csv')
## was wondering if you could pull the 2017 ACS data for this age group (ages 23-26). My questions are:
## educational attainment
## em... | /ages23-26acs2017/makeData.r | no_license | EmilyKubicek/attainmentAndEmployment | R | false | false | 4,009 | r | library(readr) ## read in the csvs faster
library(dplyr)
library(openxlsx)
states <- read.csv('../generalCode/states.csv')
jobs <- read.csv('../generalCode/occupations.csv')
## was wondering if you could pull the 2017 ACS data for this age group (ages 23-26). My questions are:
## educational attainment
## em... |
\name{mModelList}
\alias{mModelList}
\alias{beliefList}
\alias{softList}
\alias{semisupervisedList}
\alias{supervisedList}
\alias{unsupervisedList}
\title{
Fitting Gaussian mixture model or collection of models
}
\description{
These functions fit collection of models of one particular variant/class.
Models to be fitte... | /man/mModelList.Rd | no_license | andrewcstewart/bgmm | R | false | false | 5,924 | rd | \name{mModelList}
\alias{mModelList}
\alias{beliefList}
\alias{softList}
\alias{semisupervisedList}
\alias{supervisedList}
\alias{unsupervisedList}
\title{
Fitting Gaussian mixture model or collection of models
}
\description{
These functions fit collection of models of one particular variant/class.
Models to be fitte... |
## Load set up ----
source("setup.R")
## Load data ----
## the merge of ESS dataset wave 7 and 8 are used for this analysis (see the branches 'variable selection' and 'data joins')
ess <- haven::read_sav(<filename>)
## Check data ----
#glimpse(ess)
## subset ----
source("subset.R") ### Prepare data for multiple logist... | /AIC test/20200517-AIC-test.R | no_license | brilstl/paper-DEFR | R | false | false | 4,049 | r | ## Load set up ----
source("setup.R")
## Load data ----
## the merge of ESS dataset wave 7 and 8 are used for this analysis (see the branches 'variable selection' and 'data joins')
ess <- haven::read_sav(<filename>)
## Check data ----
#glimpse(ess)
## subset ----
source("subset.R") ### Prepare data for multiple logist... |
# 변수에 대한 요약 값 살펴보기
HR = read.csv('HR_comma_sep.csv')
# 변수가 Factor 형태일 때는 각 level(Low, Mid, High)에 해당하는 집계
# Count를 나타내주며, Numeric 형태일 때는 최솟값, 최댓값, 평균 및 각 분위수를 나타내줍니다.
str(HR$salary)
summary(HR$salary)
str(HR$satisfaction_level)
summary(HR$satisfaction_level)
f = as.factor(HR$salary)
str(f)
summary(f)
# 분위수 계산
# 분... | /Day02/Ex03.R | no_license | bigdata202005/RProject | R | false | false | 2,039 | r | # 변수에 대한 요약 값 살펴보기
HR = read.csv('HR_comma_sep.csv')
# 변수가 Factor 형태일 때는 각 level(Low, Mid, High)에 해당하는 집계
# Count를 나타내주며, Numeric 형태일 때는 최솟값, 최댓값, 평균 및 각 분위수를 나타내줍니다.
str(HR$salary)
summary(HR$salary)
str(HR$satisfaction_level)
summary(HR$satisfaction_level)
f = as.factor(HR$salary)
str(f)
summary(f)
# 분위수 계산
# 분... |
additionalAnalysisFolder <- "additional_analysis"
#' Run AdditionalAnalysis package
#'
#' @details
#' Run the AdditionalAnalysis package, which implements additional analysis for the IUD Study.
#'
#' @param connectionDetails An object of type \code{connectionDetails} as created using the
#' ... | /R/AdditionalAnalysis.R | permissive | cukarthik/IUDEHREstimationStudy | R | false | false | 11,623 | r | additionalAnalysisFolder <- "additional_analysis"
#' Run AdditionalAnalysis package
#'
#' @details
#' Run the AdditionalAnalysis package, which implements additional analysis for the IUD Study.
#'
#' @param connectionDetails An object of type \code{connectionDetails} as created using the
#' ... |
\name{print}
\alias{print}
\alias{print.MCBS}
\title{Print text report on console}
\description{
This function prints text report about simulation parameters and calculated coeeficients (albedo, critical angle) and total backscattered reflection.
}
\usage{
print(myObject)
}
\arguments{
\item{myObject}{The mandato... | /man/print.Rd | no_license | cran/MCBackscattering | R | false | false | 1,839 | rd | \name{print}
\alias{print}
\alias{print.MCBS}
\title{Print text report on console}
\description{
This function prints text report about simulation parameters and calculated coeeficients (albedo, critical angle) and total backscattered reflection.
}
\usage{
print(myObject)
}
\arguments{
\item{myObject}{The mandato... |
v<- "TRUE"
print(class(v))
apple <- list(c('a','b'))
apple
class(apple)
M = matrix(c('a','b','c','d','e','g'),nrow=2,ncol=3)
M
array1<-array(c('a','b','c'), dim=c(3,2,5))
array1
apple_colors<-c("red","blue","white")
factor_apple<- factor(apple_colors)
factor_apple
nlevels(factor_apple)
#data frame function
bmi<- da... | /Lab1_exam_practice.R | permissive | sunn-e/R-Projects | R | false | false | 703 | r | v<- "TRUE"
print(class(v))
apple <- list(c('a','b'))
apple
class(apple)
M = matrix(c('a','b','c','d','e','g'),nrow=2,ncol=3)
M
array1<-array(c('a','b','c'), dim=c(3,2,5))
array1
apple_colors<-c("red","blue","white")
factor_apple<- factor(apple_colors)
factor_apple
nlevels(factor_apple)
#data frame function
bmi<- da... |
library(dplyr)
library(easyPubMed)
library(ggplot2)
library(quanteda)
library(stringr)
library(tidytext)
library(topicmodels)
library(XML)
library(tictoc)
tic("full script")
##### PART 1: text mining
# 52349 documents via importation du fichier xml.
papers <- xmlParse(file = "~/Documents/Projet_Text_mininig/pubmed1... | /LDA/LDA.R | no_license | ticlement/Text-Mining-with-R | R | false | false | 4,620 | r | library(dplyr)
library(easyPubMed)
library(ggplot2)
library(quanteda)
library(stringr)
library(tidytext)
library(topicmodels)
library(XML)
library(tictoc)
tic("full script")
##### PART 1: text mining
# 52349 documents via importation du fichier xml.
papers <- xmlParse(file = "~/Documents/Projet_Text_mininig/pubmed1... |
# ========================================================================================================
# Purpose: Rscript codes for lab quiz
# Author: Bryant Khoo
# DOC: 24-10-2017
#=========================================================================================================
# Custo... | /KhooJuSengBryant.R | no_license | bryantkhoo/BC2406-Analytics-I-Lab | R | false | false | 10,129 | r | # ========================================================================================================
# Purpose: Rscript codes for lab quiz
# Author: Bryant Khoo
# DOC: 24-10-2017
#=========================================================================================================
# Custo... |
# print a table without showing row names.
write.table(t(t(mafc)), row.names = FALSE)
| /vsdujaaldwtbymc.r | no_license | kindlychung/gists | R | false | false | 86 | r | # print a table without showing row names.
write.table(t(t(mafc)), row.names = FALSE)
|
##' @export
coef.timemets <- function(object,...) {
res <- unlist(lapply(object$summary,function(x) x$estimate[,1]))
if (!is.null(names(object$var))) {
nn <- names(object$var)[seq(length(object$summary))]
} else {
nn <- object$var[seq(length(object$summary))]
}
names(res) <- past... | /R/twinlm.time.R | no_license | kkholst/mets | R | false | false | 7,073 | r | ##' @export
coef.timemets <- function(object,...) {
res <- unlist(lapply(object$summary,function(x) x$estimate[,1]))
if (!is.null(names(object$var))) {
nn <- names(object$var)[seq(length(object$summary))]
} else {
nn <- object$var[seq(length(object$summary))]
}
names(res) <- past... |
# 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/avgEVT__health__sop__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 3,316 | 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... |
time_start <- Sys.time()
resampleN <- 10000 #number of resamples for the Monte Carlo error analysis; if you wish to bypass resampling, set to 1
percentile_values <- c(0.025, 0.16, 0.5, 0.84, 0.975) #list of percentiles (of any length) used to evaluate a resampled data set; the mean (0.5) is outputted by default and ... | /00-GEOCARB-use-dS-records_10-smooth-add-bolton_monte_fail_test.R | no_license | wadesnoopy/MODEL-BASED-PALEOZOIC-ATMOSPHERIC-OXYGEN-ESTIMATES | R | false | false | 77,270 | r | time_start <- Sys.time()
resampleN <- 10000 #number of resamples for the Monte Carlo error analysis; if you wish to bypass resampling, set to 1
percentile_values <- c(0.025, 0.16, 0.5, 0.84, 0.975) #list of percentiles (of any length) used to evaluate a resampled data set; the mean (0.5) is outputted by default and ... |
# Creating a data direcory if a data folder does not exist
if (!file.exists("data")) {dir.create("data")}
# Downloading the data file from the internet
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
destfile <- "./data/power_consumption.zip"
download.file(fileUrl, de... | /plot1.R | no_license | qstata/ExData_Plotting1 | R | false | false | 1,388 | r | # Creating a data direcory if a data folder does not exist
if (!file.exists("data")) {dir.create("data")}
# Downloading the data file from the internet
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
destfile <- "./data/power_consumption.zip"
download.file(fileUrl, de... |
## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setin... | /cachematrix.R | no_license | kjeads/ProgrammingAssignment2 | R | false | false | 938 | r | ## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setin... |
#' genenate a list of data with missing observation
#' @description genenate a list of data with missing observation for demo tests
#' @param N: number of observations
#' @param R: repeating times
#' @param T: time periods
#' @param K: something you know
#' @param rho1,rho2,sigu2,zeta: parameters you give to test
#' @p... | /R/gen_demo_data.R | no_license | Gabegit/gmJenkins | R | false | false | 4,689 | r | #' genenate a list of data with missing observation
#' @description genenate a list of data with missing observation for demo tests
#' @param N: number of observations
#' @param R: repeating times
#' @param T: time periods
#' @param K: something you know
#' @param rho1,rho2,sigu2,zeta: parameters you give to test
#' @p... |
#### Load proper libraries for AOP Networks and Graph Analyses ####
library("aop")
library(graph)
library(igraph)
library(readr)
library(ggplot2)
library(rgl)
library(plotrix)
workingDir <-"C://Users/NPollesc/Desktop/GitHub/AOPwiki/" #EPA Dir
# workingDir<- "C://Users/Nathan Pollesch/Documents/GitHub/AOPWiki/" #Perso... | /R_files/AOP_network_analysis_Thyroid.R | no_license | npollesch/AOPWiki | R | false | false | 18,795 | r | #### Load proper libraries for AOP Networks and Graph Analyses ####
library("aop")
library(graph)
library(igraph)
library(readr)
library(ggplot2)
library(rgl)
library(plotrix)
workingDir <-"C://Users/NPollesc/Desktop/GitHub/AOPwiki/" #EPA Dir
# workingDir<- "C://Users/Nathan Pollesch/Documents/GitHub/AOPWiki/" #Perso... |
\name{predicates}
\alias{predicates}
\alias{relation_is}
\alias{relation_is_Euclidean}
\alias{relation_is_Ferrers}
\alias{relation_is_acyclic}
\alias{relation_is_antisymmetric}
\alias{relation_is_asymmetric}
\alias{relation_is_bijective}
\alias{relation_is_binary}
\alias{relation_is_complete}
\alias{relation_is_corefle... | /man/predicates.Rd | no_license | cran/relations | R | false | false | 11,102 | rd | \name{predicates}
\alias{predicates}
\alias{relation_is}
\alias{relation_is_Euclidean}
\alias{relation_is_Ferrers}
\alias{relation_is_acyclic}
\alias{relation_is_antisymmetric}
\alias{relation_is_asymmetric}
\alias{relation_is_bijective}
\alias{relation_is_binary}
\alias{relation_is_complete}
\alias{relation_is_corefle... |
## bird and lichen richness modeled simultaniously with covariates
##
## First edit: 20190716
## Last edit: 20191007
##
## Author: Julian Klein
model{
## Likelihood:
## Ecological process model:
for(i in 1:nobs){
r_mean[i] ~ dnorm(richness[i], 1/r_sd[i]^2)
r_sim[i] ~ dnorm(richness[i], 1/r_sd[i]^2)... | /scripts/JAGS/lichen&bird_summed.R | no_license | juklei/uppland_lichen_bird_paper | R | false | false | 1,366 | r | ## bird and lichen richness modeled simultaniously with covariates
##
## First edit: 20190716
## Last edit: 20191007
##
## Author: Julian Klein
model{
## Likelihood:
## Ecological process model:
for(i in 1:nobs){
r_mean[i] ~ dnorm(richness[i], 1/r_sd[i]^2)
r_sim[i] ~ dnorm(richness[i], 1/r_sd[i]^2)... |
\name{lagStation}
\alias{lagStation}
\title{Introduce a lag in station values}
\description{Shifts the station values in time: introduce a lag}
\usage{lagStation(x,lag=0)}
\arguments{
\item{x}{A station object (see \code{\link{station.obj}}).}
\item{lag}{lag}
}
\value{Astation object}
\author{R.E. Benestad}
... | /man/lagStation.Rd | no_license | ogutu/clim.pact | R | false | false | 501 | rd | \name{lagStation}
\alias{lagStation}
\title{Introduce a lag in station values}
\description{Shifts the station values in time: introduce a lag}
\usage{lagStation(x,lag=0)}
\arguments{
\item{x}{A station object (see \code{\link{station.obj}}).}
\item{lag}{lag}
}
\value{Astation object}
\author{R.E. Benestad}
... |
# Merge X_train and X_test. First read data into R, add the variables names (features.txt), and then row bind X_train and X_test.
trainDF <- read.table("./data/train/X_train.txt")
testDF <- read.table("./data/test/X_test.txt")
varNames <- readLines("./data/features.txt")
ncol(trainDF) == length(varNames)
ncol(testDF) ... | /run_analysis.R | no_license | jadanaque/GCData-SamsungGalaxyProject | R | false | false | 3,003 | r | # Merge X_train and X_test. First read data into R, add the variables names (features.txt), and then row bind X_train and X_test.
trainDF <- read.table("./data/train/X_train.txt")
testDF <- read.table("./data/test/X_test.txt")
varNames <- readLines("./data/features.txt")
ncol(trainDF) == length(varNames)
ncol(testDF) ... |
source("./Rscripts/read.data.R")
source("./Rscripts/process.data.R")
#prerprocess and save data
#compute power specturm?
powerspectrum = T
#which session folder
session = 9
#start time signal to extract
start = 1001
#length of signal to extract
inc = 200
#repreat n times with start incrementing by inc
n = 5
#amoun... | /Rscripts/setup.multi.R | no_license | suppechasper/zebra-scripts | R | false | false | 1,007 | r | source("./Rscripts/read.data.R")
source("./Rscripts/process.data.R")
#prerprocess and save data
#compute power specturm?
powerspectrum = T
#which session folder
session = 9
#start time signal to extract
start = 1001
#length of signal to extract
inc = 200
#repreat n times with start incrementing by inc
n = 5
#amoun... |
library(dplyr)
library(foreign)
library(stringr)
ebay <- read.dta("http://www.farys.org/daten/ebay.dta")
ebay
mtcars
dplyr::filter(mtcars, !grepl('Toyota'))
?base::grepl
titanic <- read.dta("http://www.stata-press.com/data/kkd/titanic2.dta")
head(titanic)
# filter
filter(titanic, class == "1st class", sex=="wom... | /work.R | no_license | spip333/dataMining | R | false | false | 4,567 | r | library(dplyr)
library(foreign)
library(stringr)
ebay <- read.dta("http://www.farys.org/daten/ebay.dta")
ebay
mtcars
dplyr::filter(mtcars, !grepl('Toyota'))
?base::grepl
titanic <- read.dta("http://www.stata-press.com/data/kkd/titanic2.dta")
head(titanic)
# filter
filter(titanic, class == "1st class", sex=="wom... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_post.R
\name{GetPMEst}
\alias{GetPMEst}
\title{Retrieve the Surface of Posterior Means}
\usage{
GetPMEst(fit, num_comp = 1, burnin = floor(fit$L/10))
}
\arguments{
\item{fit}{Object of class \code{damcmc_res} or \code{bdmcmc_res}.}
\item... | /sppmix/man/GetPMEst.Rd | no_license | albrizre/spatstat.revdep | R | false | true | 1,839 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_post.R
\name{GetPMEst}
\alias{GetPMEst}
\title{Retrieve the Surface of Posterior Means}
\usage{
GetPMEst(fit, num_comp = 1, burnin = floor(fit$L/10))
}
\arguments{
\item{fit}{Object of class \code{damcmc_res} or \code{bdmcmc_res}.}
\item... |
library(network)
### Name: as.sociomatrix
### Title: Coerce One or More Networks to Sociomatrix Form
### Aliases: as.sociomatrix
### Keywords: graphs manip
### ** Examples
#Generate an adjacency array
g<-array(rbinom(100,1,0.5),dim=c(4,5,5))
#Generate a network object
net<-network(matrix(rbinom(36,1,0.5),6,6))
#C... | /data/genthat_extracted_code/network/examples/as.sociomatrix.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 591 | r | library(network)
### Name: as.sociomatrix
### Title: Coerce One or More Networks to Sociomatrix Form
### Aliases: as.sociomatrix
### Keywords: graphs manip
### ** Examples
#Generate an adjacency array
g<-array(rbinom(100,1,0.5),dim=c(4,5,5))
#Generate a network object
net<-network(matrix(rbinom(36,1,0.5),6,6))
#C... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{plot_nnm}
\alias{plot_nnm}
\title{MM Algorithm - Plot NNM}
\usage{
plot_nnm(nnm)
}
\arguments{
\item{nnm}{NNM object from generate_nnm function}
}
\description{
\code{plot_nnm} Function for plotting nnm
}
\examples{
# Generate nonnegative matrix
n <- 1e3
p <- 1... | /man/plot_nnm.Rd | no_license | cran/gettingtothebottom | R | false | false | 417 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{plot_nnm}
\alias{plot_nnm}
\title{MM Algorithm - Plot NNM}
\usage{
plot_nnm(nnm)
}
\arguments{
\item{nnm}{NNM object from generate_nnm function}
}
\description{
\code{plot_nnm} Function for plotting nnm
}
\examples{
# Generate nonnegative matrix
n <- 1e3
p <- 1... |
graph_cor <- function(file, samplename, length) {
if (samplename == 'all') {
df1 <- gather(file, key = 'GeneLength', value = 'ExpressionLevel', -samples)
df1[,'GeneLength'] <- as.numeric(df1[,'GeneLength'])
df1[,'ExpressionLevel'] <- as.numeric(df1[,'ExpressionLevel'])
a <- log10(df1[,'ExpressionLevel'])... | /shinyfunction/expressionlevel/explevel_graph_cor.R | no_license | leungman426/MultideepQC | R | false | false | 3,311 | r |
graph_cor <- function(file, samplename, length) {
if (samplename == 'all') {
df1 <- gather(file, key = 'GeneLength', value = 'ExpressionLevel', -samples)
df1[,'GeneLength'] <- as.numeric(df1[,'GeneLength'])
df1[,'ExpressionLevel'] <- as.numeric(df1[,'ExpressionLevel'])
a <- log10(df1[,'ExpressionLevel'])... |
testlist <- list(n = 0L, x = structure(c(4.77772676628587e-299, 4.05342608943854e-312 ), .Dim = 1:2))
result <- do.call(multivariance:::doubleCenterBiasCorrectedUpperLower,testlist)
str(result) | /multivariance/inst/testfiles/doubleCenterBiasCorrectedUpperLower/libFuzzer_doubleCenterBiasCorrectedUpperLower/doubleCenterBiasCorrectedUpperLower_valgrind_files/1612735591-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 193 | r | testlist <- list(n = 0L, x = structure(c(4.77772676628587e-299, 4.05342608943854e-312 ), .Dim = 1:2))
result <- do.call(multivariance:::doubleCenterBiasCorrectedUpperLower,testlist)
str(result) |
# A function that computes the "simple" flowlength as described in Rodriguez
# et al.
#
#' @title Flow length indicator
#'
#' @description Computes the flow length of a given matrix
#'
#' @details
#'
#' This function computes the flow length of a given matrix, using a
#' planar approximation (the slop... | /R/task_flowlength.R | permissive | agmayor/spatialwarnings | R | false | false | 4,899 | r | # A function that computes the "simple" flowlength as described in Rodriguez
# et al.
#
#' @title Flow length indicator
#'
#' @description Computes the flow length of a given matrix
#'
#' @details
#'
#' This function computes the flow length of a given matrix, using a
#' planar approximation (the slop... |
## In this library there are two functions; makeCasheMatrix and cacheSolve.
## The purpose of the library is to create a matrix and its inverse.
## Matrix Inverse is saved in the environment cache to save inverse process time and
## resources.
## Input: a variable of type "Matrix" that will be used to create the inver... | /cachematrix.R | no_license | Ahmadmcs/ProgrammingAssignment2 | R | false | false | 1,520 | r | ## In this library there are two functions; makeCasheMatrix and cacheSolve.
## The purpose of the library is to create a matrix and its inverse.
## Matrix Inverse is saved in the environment cache to save inverse process time and
## resources.
## Input: a variable of type "Matrix" that will be used to create the inver... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{inv_gauss_sampler}
\alias{inv_gauss_sampler}
\title{Inverse Gaussian Sampler}
\usage{
inv_gauss_sampler(mu, lambda)
}
\arguments{
\item{mu}{mean value}
\item{lambda}{shape value}
}
\value{
real value: simulated point from... | /man/inv_gauss_sampler.Rd | permissive | rchan26/layeredBB | R | false | true | 711 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{inv_gauss_sampler}
\alias{inv_gauss_sampler}
\title{Inverse Gaussian Sampler}
\usage{
inv_gauss_sampler(mu, lambda)
}
\arguments{
\item{mu}{mean value}
\item{lambda}{shape value}
}
\value{
real value: simulated point from... |
gf_point(pallets ~ day, data = Pallets,
color = ~ employee) %>%
gf_line(group = ~ employee)
| /inst/snippet/pallets03.R | no_license | rpruim/fastR2 | R | false | false | 105 | r | gf_point(pallets ~ day, data = Pallets,
color = ~ employee) %>%
gf_line(group = ~ employee)
|
# save test prediction in Kaggle format
save_submission <- function(dataset, model) {
Id = as.data.frame(test_id)
SalePrice <- as.data.frame(predict(model, newdata=dataset))
submission = cbind(Id, SalePrice)
colnames(submission) <- c("Id","SalePrice")
write.csv(submission, file="submissio... | /funkcje.R | no_license | SylwiaOliwia2/Decision-tree-random-forest-xgboost-comparison | R | false | false | 8,155 | r | # save test prediction in Kaggle format
save_submission <- function(dataset, model) {
Id = as.data.frame(test_id)
SalePrice <- as.data.frame(predict(model, newdata=dataset))
submission = cbind(Id, SalePrice)
colnames(submission) <- c("Id","SalePrice")
write.csv(submission, file="submissio... |
require(dplyr)
require(lubridate)
# This function fetches the dataset zip file, extracts it in the wd
download_files <- function() {
if (!file.exists("./dataset.zip")) {
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",
dest="data... | /read_data.R | no_license | hardikns/ExData_Plotting1 | R | false | false | 849 | r | require(dplyr)
require(lubridate)
# This function fetches the dataset zip file, extracts it in the wd
download_files <- function() {
if (!file.exists("./dataset.zip")) {
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",
dest="data... |
library(knitr)
library(MASS)
library(leaps)
library(car)
# Fetch Data
qb_stats <- read.csv("../data/qb_stats.csv")
# Grab the college predictors
predictors <- c('height', 'weight', 'age', 'c_avg_cmpp', 'c_rate', 'c_pct', 'c_avg_inter', 'c_avg_tds', 'c_avg_yds', 'c_numyrs', 'c_avg_att')
college_stats = qb_stats[,predi... | /models/linear_regression/lin_reg.r | no_license | sportsbitenews/qb_scraping | R | false | false | 7,287 | r | library(knitr)
library(MASS)
library(leaps)
library(car)
# Fetch Data
qb_stats <- read.csv("../data/qb_stats.csv")
# Grab the college predictors
predictors <- c('height', 'weight', 'age', 'c_avg_cmpp', 'c_rate', 'c_pct', 'c_avg_inter', 'c_avg_tds', 'c_avg_yds', 'c_numyrs', 'c_avg_att')
college_stats = qb_stats[,predi... |
# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Cmd + Shift + B'
# Check Package: ... | /run_analysis.R | no_license | tatlim/Getting-and-Cleaning-data-course-project | R | false | false | 2,631 | r | # Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Build and Reload Package: 'Cmd + Shift + B'
# Check Package: ... |
# Create a matrix
my_mat_1 = matrix(1:9, nrow = 3, ncol = 3)
my_mat_1
my_mat_2 = matrix(1:9, nrow=3, byrow=TRUE)
my_mat_2
col_based = cbind(c(10,20,30),c(40,50,60),c(70,80,90))
col_based
row_based = rbind(c(11,22,33),c(44,55,66))
row_based
vect_matrix = c(1:9)
vect_matrix
dim(vect_matrix) <- c(3,3)... | /R/003 Matrix.R | no_license | abhishekasingh/100daysofcoding | R | false | false | 1,459 | r | # Create a matrix
my_mat_1 = matrix(1:9, nrow = 3, ncol = 3)
my_mat_1
my_mat_2 = matrix(1:9, nrow=3, byrow=TRUE)
my_mat_2
col_based = cbind(c(10,20,30),c(40,50,60),c(70,80,90))
col_based
row_based = rbind(c(11,22,33),c(44,55,66))
row_based
vect_matrix = c(1:9)
vect_matrix
dim(vect_matrix) <- c(3,3)... |
# Testing idea about mean concentrations
rm(list = ls(all = T))
# First load libraries
library(plyr)
library(ggplot2)
library(stringr)
# Define elimination rate constant, simulation resolution and forcing function
# k <- 0.00017816/0.00031271 # brain
# k <- 0.00038372/0.00031271 # heart
# k <- 0.0... | /rscripts/mobi_paper_exp.R | no_license | jhhughes256/len_pbpk | R | false | false | 5,446 | r | # Testing idea about mean concentrations
rm(list = ls(all = T))
# First load libraries
library(plyr)
library(ggplot2)
library(stringr)
# Define elimination rate constant, simulation resolution and forcing function
# k <- 0.00017816/0.00031271 # brain
# k <- 0.00038372/0.00031271 # heart
# k <- 0.0... |
library(tseries)
library(zoo)
library(forecast)
#Prices
KHC.z <- get.hist.quote(instrument="KHC", start="2016-01-01", quote="AdjClose",
provider="yahoo", end = "2019-01-01", compression="month")
index(KHC.z) <- as.yearmon(index(KHC.z))
colnames(KHC.z) <- "KHC"
KHC.z <- aggregate(KHC.z, index(... | /data/forecasting/khc_for.R | no_license | vittoriomaggio/RBusinessProject | R | false | false | 1,718 | r | library(tseries)
library(zoo)
library(forecast)
#Prices
KHC.z <- get.hist.quote(instrument="KHC", start="2016-01-01", quote="AdjClose",
provider="yahoo", end = "2019-01-01", compression="month")
index(KHC.z) <- as.yearmon(index(KHC.z))
colnames(KHC.z) <- "KHC"
KHC.z <- aggregate(KHC.z, index(... |
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
fluidRow(
checkboxGroupButtons(inputId = "checkBtn", label = "Make a choice :", choices = c("Choice A", "Choice B", "Choice C"))
),
fluidRow(
radioGroupButtons(inputId = "radioBtn", label = "Make a choice :", choices = c("Choice A", "Choice B", "Choi... | /shinywidgets/02_buttons.R | permissive | chunjie-sam-liu/shinyapp-test | R | false | false | 1,302 | r | library(shiny)
library(shinyWidgets)
ui <- fluidPage(
fluidRow(
checkboxGroupButtons(inputId = "checkBtn", label = "Make a choice :", choices = c("Choice A", "Choice B", "Choice C"))
),
fluidRow(
radioGroupButtons(inputId = "radioBtn", label = "Make a choice :", choices = c("Choice A", "Choice B", "Choi... |
install.packages("ape") | /src/core_gene_sweeps/install_ape.R | no_license | jiyunli/PopCOGenT | R | false | false | 23 | r | install.packages("ape") |
tabPanel("About",
HTML(
'<p style="text-align:justify">This web application uses data collected by the Center for Watershed Sciences at UC Davis
as part of a Long-term River Monitoring Project, building on a previous California Energy Comission Project. Solinst pressure transducers
h... | /about_v2.R | no_license | bdpiccolo/thermohydrographs | R | false | false | 3,044 | r | tabPanel("About",
HTML(
'<p style="text-align:justify">This web application uses data collected by the Center for Watershed Sciences at UC Davis
as part of a Long-term River Monitoring Project, building on a previous California Energy Comission Project. Solinst pressure transducers
h... |
library(okcupiddata)
profiles$male <- ifelse(profiles$sex == "m", 1, 0)
my.profiles <- subset(profiles, height >= 55 &
height <= 80)
model2 <- glm(male ~ height + orientation,
data=my.profiles, family=binomial)
summary(model2)
exp(-46.08)
empirical.logit.plot(model2)
predicted.m... | /lecture-scripts/lecture-18.R | no_license | SudeepS97/sta371g | R | false | false | 572 | r | library(okcupiddata)
profiles$male <- ifelse(profiles$sex == "m", 1, 0)
my.profiles <- subset(profiles, height >= 55 &
height <= 80)
model2 <- glm(male ~ height + orientation,
data=my.profiles, family=binomial)
summary(model2)
exp(-46.08)
empirical.logit.plot(model2)
predicted.m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.